Posts: 6
Joined: Aug 2013
Reputation:
0
I've been playing around a bit with an existing plugin that already acts as a service of sorts to better integrate it with the XBMC library. One thing I would like to accomplish is to receive JSON notifications regarding changes to the video library. In this specific case I'm looking to capture when something is removed from the library or is marked as watched. I have found several examples of sending JSON calls to XBMC and parsing the results but nothing I've found seemingly ties into the notifications. So any pointers on where to start or how to accomplish this? In the plugin I'm extending there's already a 'service' running that extends xbmc.Player and monitors its status in a loop so somehow this would need to be done asynchronously from that.
Posts: 6
Joined: Aug 2013
Reputation:
0
Thanks for the response Sphere.
It might be semantics but I'm currently executing/sending JSON commands and receiving results so that's why I was thinking JSON.
If I understand the docs the onDatabaseUpdated call doesn't seem to tell me anything about what was changed other than the database name ... right? Or am I missing something really basic here?
Posts: 6
Joined: Aug 2013
Reputation:
0
I've found the perfect example using JSON in the TrakUtilities script and have the bulk of it figured out. If there is an easier, more direct way to be notified when an item is marked as watched or removed from the library I'd love to know.
Posts: 6
Joined: Aug 2013
Reputation:
0
For clarity and my own interest, am I correct in my understanding of the onDatabaseUpdate method? It's not going to tell me anything about what actually changed making it impossible to act upon the playcount/watched status being changed.
Posts: 6
Joined: Aug 2013
Reputation:
0
Thanks Montallese for both the confirmation and work on enhancing the monitor class.