List of fields in the songs table

Post a reply

Smilies
:D :) :( :o :-? 8) :lol: :x :P :oops: :cry: :evil: :roll: :wink:

BBCode is ON
[img] is ON
[url] is ON
Smilies are ON

Topic review
   

Expand view Topic review: List of fields in the songs table

Re: List of fields in the songs table

by drakinite » Wed Oct 27, 2021 8:39 pm

Also, if you want a list of all fields, check uitools.tracklistFieldDefs. Defined in controls/trackListView.js.

Re: List of fields in the songs table

by drakinite » Wed Oct 27, 2021 8:23 pm

To answer your question, no, not yet*. Adding that now to my ever-growing to-do list :sweat_smile:

As a brief run-down:
- dbFunc can be any of the functions in app.db. If you open the dev console and type app.db, you can see all the possible methods (but some of them require SQL, and some of them support categories). The ones which take SQL are currently documented here: https://www.mediamonkey.com/docs/api/classes/DB.html
- To my knowledge, dbFunc and dbFuncParams are currently only used by the Dropdown control.

Categories currently supported by getPeople:
- artist, author, conductor, producer, director, screenwriter, actor, lyricist

Categories currently supported by getStringList:
- collection, CPUCores, PlayActions, PlayNowActions, Languages, addonCategories, trackType, album, parentalrating, genre, tempo, mood, occasion, quality, extendedTags, coverTypes, initialKey, empty

Actually, it looks like getPeople and getStringList are the only db functions that support that "category" format. Might not be as tedious to add to the documentation, in fact.
*Edit: DB API documentation has been added; it'll be added to the web docs next time they're updated.

Re: List of fields in the songs table

by dtsig » Wed Oct 27, 2021 2:34 pm

you can get a l ist of columns for all tables here https://www.mediamonkey.com/wiki/Databa ... _%28MM4%29

List of fields in the songs table

by MPG » Wed Oct 27, 2021 1:53 pm

Hi,
I am working on a search and replace add-on. I have a dropdown that I would like to populate with a listing of the fields that can be searched and have values replaced. While I could hard-code them, I don't believe that is the proper solution.

I found the following code that obtains the list of languages. Is there a way to get a listing of the fields?

<div data-id="cbDestination" data-control-class="Dropdown" data-init-params="{readOnly: true, dbFunc:'getStringList', dbFuncParams: {category: 'Languages'}, preload: true}" style="min-width: 20em"></div>

Is there some repository that can list all of the options for dbFuncParams?

Top