How to detect change in "current playlist"?
#1
Hi there

Is it possible to somehow detect a change in the "current playlist" (if one has queued items)? It works fine for ADDING an item using xbmc.Monitor and its onNotification method when listening for Playlist.OnAdd.

I'm looking for a corresponding "trigger" if I delete an entry from the playlist or switch items' order.

Thx!
Reply
#2
What's wrong with Playlist.OnRemove?
Or Playlist.OnClear for that matter...
But moving items around, nope you'd have to monitor that yourself.
If it's really important to you, while on your Playlist interface, launch a service every few seconds to query the currently displayed playlist and compare what you have with what returns...

Not sure what you concider the 'current' playlist as there can be up to 3 populated playlists at any one time, but if you are just speaking of any playlist that is populated for the currently active player, well then it makes it that much simpler.
Reply
#3
Thanks for clarifying.

Nothing's wrong with Playlist.OnRemove. I was just hoping that there was another way to have xbmc.Monitor listen for every possible event in regards to playlist manipulation. So not only adding and removing items and clearing the entire playlist but also switching the items' order.

Ah well, another thread to poll the playlists :-)
Reply
#4
Ya. playlists are the only lists that require server management as they are tied to the built in players.
Reply

Logout Mark Read Team Forum Stats Members Help
How to detect change in "current playlist"?0