SELECT ID, AlbumArtist, Songtitle, PlayCounter FROM [Songs] WHERE [ID]=10409
shows "9". But the GUI still shows the old value "0", and it will be reset to "old value" +1 after the next playthrough.
Guess i'm doing it wrong?
- my 24/7 media server | MMW 2024.0.0.3038 (non-portable, shared DB & files, only essential addons) | Windows 2016
- my desktop app | MMW 2024.0.0.3038 (portable, shared DB & files) | Windows 11
- my mobile app | MMA Pro 2.0.0.1175 on several Android 10, 11, 12 devices | WiFi Sync - MP3Tag | MP3Diags | MP3DirectCut | IrfanView
var list = app.db.getTracklist('SELECT * FROM Songs WHERE ID = 10409', -1);
list.whenLoaded().then(() => {
listForEach(list, (item) => {
item.playCounter = 9;
});
list.commitAsync(); // saves the tracks to the database and tag
});
Ludek wrote: ↑Thu Jan 28, 2021 11:49 am
I guess this happens because the track is already loaded in the memory and shown in the user interface?
That's it. If i restart MMW on the "Pos1"-Node, execute my SQL, and then select the artist, the updates are there.
Thank's a lot!
Great Addon, btw.
[solved]
- my 24/7 media server | MMW 2024.0.0.3038 (non-portable, shared DB & files, only essential addons) | Windows 2016
- my desktop app | MMW 2024.0.0.3038 (portable, shared DB & files) | Windows 11
- my mobile app | MMA Pro 2.0.0.1175 on several Android 10, 11, 12 devices | WiFi Sync - MP3Tag | MP3Diags | MP3DirectCut | IrfanView