ListItem PlayCount and Library
#1
I write a plugin to watch online series from www.soap4.me. I try to set watch status of episode by this construction:

info={}
info['season'] = int(row['season'])
info['episode'] = int(row['episode'])
info['playcount'] = 1

li = xbmcgui.ListItem(info['title'], iconImage = img, thumbnailImage = img)
li.setProperty('IsPlayable', 'true')
li.setInfo(type = vtype, infoLabels = info)
xbmcplugin.addDirectoryItem(h, uri, li, IsFolder)

When the episode is not yet viewed (Where is now record in files table in MyVideos75.db), all is ok. Episode mark as watch. But when i start playing this episode, xbmc create record in Library for this file. After that xbmc ignore setInfo in plugin script and mark episode with information from Library.

How can i overwrite information from Library. Can i do it from script or i must write with database and change watch status there?

I use Xbmc 12.1
Reply
#2
As far as I'm aware this isn't possible. Problem is that XBMC grabs stuff from the db after directory fetch, so overrides anything that's there (if there's information in the db for that item).
Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.


Image
Reply
#3
Bad that XBMC does not allow overwrite data from the database with standard methods.
A found method to control watched mark but it's not quite correct. First i have one more question. Is there a method in JSON-RPC to change parameter playCount for files with type video (not Movies or TV Shows)?

Now about method to control watched mark. XBMC search record in DB by uri which is passed in xbmcplugin.addDirectoryItem(h, uri, li, IsFolder). So if we add some unique data to uri each time we created episode list, XBMC can't find record in DB. I add timestamp to uri (&mark=time.time())
Reply

Logout Mark Read Team Forum Stats Members Help
ListItem PlayCount and Library0