Posts: 103
Joined: Feb 2016
Reputation:
11
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!
Posts: 146
Joined: Mar 2015
Reputation:
6
axa88
Senior Member
Posts: 146
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.
Posts: 103
Joined: Feb 2016
Reputation:
11
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 :-)
Posts: 146
Joined: Mar 2015
Reputation:
6
axa88
Senior Member
Posts: 146
Ya. playlists are the only lists that require server management as they are tied to the built in players.