2014-06-14, 13:43
I've written an addon that pulls media files from the library (i.e. the media is in XBMC's database). I create a directory of these media files by calling:
The problem I'm having is when the user hits "w" and marks the media as watched. In fact it seems to work - the playcount is set, the appropriate overlays are displayed/removed indicating watched etc. Also if I use the native TV Show menu item it will show the episodes are correctly marked as either watched or unwatched.
The part that is broken is that the JSON notification "OnUpdate" doesn't fire. From the native player I this fires:
Why doesn't it fire when the same action marks the media watched/unwatched with "w" in the addon?
My second question - if this is intended behavior, is there a way to catch this event a different way in my addon?
Thanks,
Damon
PHP Code:
xbmcplugin.setContent(pluginhandle, "episodes")
xbmcplugin.addDirectoryItem(pluginhandle, url=episode['file'], listitem=li, isFolder=False)
xbmcplugin.endOfDirectory(pluginhandle)
The problem I'm having is when the user hits "w" and marks the media as watched. In fact it seems to work - the playcount is set, the appropriate overlays are displayed/removed indicating watched etc. Also if I use the native TV Show menu item it will show the episodes are correctly marked as either watched or unwatched.
The part that is broken is that the JSON notification "OnUpdate" doesn't fire. From the native player I this fires:
PHP Code:
{"jsonrpc":"2.0","method":"VideoLibrary.OnUpdate","params":{"data":{"item":{"id":4,"type":"episode"},"playcount":1},"sender":"xbmc"}}
Why doesn't it fire when the same action marks the media watched/unwatched with "w" in the addon?
My second question - if this is intended behavior, is there a way to catch this event a different way in my addon?
Thanks,
Damon