Editing tracks in a tracklist
Posted: Mon Jul 17, 2023 6:52 am
I've attempted to edit access tracks from the now playing list in two ways.
The first is what the documentation seemed to encourage as far as I could tell.
However, even though I'm using the commands to lock the list, I still get Uncaught (in promise) Error: Read lock not acquired!. (I also get it if I don't lock the list).
However, with the second method, found on the forums, it works fine (Even when I edit the extended meta tags).
This confuses me. What's different about the two approaches? Aren't I still getting a track object either way?
Also, when does one need to lock the list if not in this case?
Thanks,
Dale.
The first is what the documentation seemed to encourage as far as I could tell.
However, even though I'm using the commands to lock the list, I still get Uncaught (in promise) Error: Read lock not acquired!. (I also get it if I don't lock the list).
Code: Select all
let list = uitools.getSelectedTracklist();
await list.whenLoaded();
list.beginUpdate();
for(let i=0; i<list.count; i++) {
console.log('track', track);
}
list.endUpdate();
Code: Select all
let list = uitools.getSelectedTracklist();
await list.whenLoaded();
list.forEach(track => {
console.log('track', track);
});
This confuses me. What's different about the two approaches? Aren't I still getting a track object either way?
Also, when does one need to lock the list if not in this case?
Thanks,
Dale.