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?
List of fields in the songs table
Moderators: jiri, drakinite, Addon Administrators
List of fields in the songs table
TIA
MPG
Triumph - Hold On: Music holds the secret, to know it can make you whole.
MPG
Triumph - Hold On: Music holds the secret, to know it can make you whole.
Re: List of fields in the songs table
you can get a l ist of columns for all tables here https://www.mediamonkey.com/wiki/Databa ... _%28MM4%29
Where's the db and ini stored
Reporting Bugs
Where tags are stored
Not affiliated with MediaMonkey ... just a RABID user/lover
DTSig
Reporting Bugs
Where tags are stored
Not affiliated with MediaMonkey ... just a RABID user/lover
DTSig
Re: List of fields in the songs table
To answer your question, no, not yet*. Adding that now to my ever-growing to-do list
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.
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.
Student electrical-computer engineer, web programmer, part-time MediaMonkey developer, full-time MediaMonkey enthusiast
I uploaded many addons to MM's addon page, but not all of those were created by me. "By drakinite, Submitted by drakinite" means I made it on my own time. "By Ventis Media, Inc., Submitted by drakinite" means it may have been made by me or another MediaMonkey developer, so instead of crediting/thanking me, please thank the team. You can still ask me for support on any of our addons.
Re: List of fields in the songs table
Also, if you want a list of all fields, check uitools.tracklistFieldDefs. Defined in controls/trackListView.js.
Student electrical-computer engineer, web programmer, part-time MediaMonkey developer, full-time MediaMonkey enthusiast
I uploaded many addons to MM's addon page, but not all of those were created by me. "By drakinite, Submitted by drakinite" means I made it on my own time. "By Ventis Media, Inc., Submitted by drakinite" means it may have been made by me or another MediaMonkey developer, so instead of crediting/thanking me, please thank the team. You can still ask me for support on any of our addons.