Clears cache of data already read from DB.
It's useful when changing the DB externally or using executeQueryAsync
After calling app.db.clearCache() the MM5 internal cache is cleared and the data is reloaded from DB (e.g. when F5 is pressed or a view refreshed)
Note: Introduced in version 5.0.4
// navigate to Music > All tracks
await app.db.executeQueryAsync("UPDATE Songs SET SongTitle = 'BlahBlah' WHERE ID = 1");
await app.db.clearCache();
uitools.refreshView(); // to reload the tracklist
Gets artist list by given SQL query
SQL like 'SELECT * FROM Artists WHERE ...'
Optional
idColl: numberGets SQL of given auto-playlist ID
NOTE: Added in version 5.0.4
auto-playlist's id
5.0.4
app.db.getAutoPlaylistQueryAsync( 1).then((sql) => {
var trcklist = app.db.getTracklist(sql, -1);
trcklist.whenLoaded().then(() => {
// all tracks are loaded here
});
});
Gets artist list from given JS array with artist names and MusicBrainz GID. JS array contains objects, with "name" and "mbgid" properties. It returns only artists, which are in Library.
JS array with artist names and MusicBrainz GIDs
Get list of mood values.
Optional
idColl: numberGet list of occasion values.
Optional
idColl: numberGet list of "people", according to a specified category. Usage: app.db.getPeople({category: '<categoryname>'})
var list = app.db.getPeople({category: 'artist'}); <br>
<div data-control-class="Dropdown" data-init-params="{dbFunc: 'getPeople', dbFuncParams: {category: 'artist'}}">
Get list pinned objects (tracks, artists, albums etc.).
Optional
collectionID: numberID of collection (default all collections)
Get list of quality values.
Optional
idColl: numberOpens specified SQL query and returns promise with QueryResults class.
Select query to open
Get a list of strings, according to a specified category. Usage: app.db.getStringList({category: '<categoryname>'})
Optional
includevar list = app.db.getStringList({category: 'genre'}); <br>
<div data-control-class="Dropdown" data-init-params="{dbFunc: 'getStringList', dbFuncParams: {category: 'genre'}}">
Get list of tempo values.
Optional
idColl: number
Database support. Access via the global
app.db