Posts: 43
Joined: May 2010
Reputation:
1
adammw
Junior Member
Posts: 43
2010-09-17, 13:38
(This post was last modified: 2010-09-20, 05:08 by adammw.)
Hi
I just discovered what a difference xbmcplugin.setContent(handle=int(sys.argv[1]), content='tvshows') makes to my plugin, and I was wondering if I could set some of those fields that show up in media info view such as aired, or total number of episodes?
I've tried listitem.setInfo("tvshow",{'totalepisodes':2}) but with no avail. What is the correct syntax (if there is one) for this?
Thanks,
Posts: 1,432
Joined: May 2004
Reputation:
73
BlueCop
Skilled Python Coder
Posts: 1,432
Try just setting episode instead of totalepisodes. It works for total episodes when I set content to 'seasons'.
Posts: 43
Joined: May 2010
Reputation:
1
adammw
Junior Member
Posts: 43
Thanks, that worked. I didn't know about 'seasons', are these documented?
Posts: 646
Joined: May 2009
Reputation:
30
2011-12-20, 21:45
(This post was last modified: 2011-12-20, 21:57 by Eldorado.)
Bringing this one back up from the dead..
Has anyone been successful in setting values for # watched and # unwatched? Total episodes work with the tip from BlueCop
I can't find the proper syntax for setting ListItem.Property type values
I've tried without any luck:
ListItem.setProperty('TotalEpisodes','30')
ListItem.setProperty('WatchedEpisodes','15')
Posts: 646
Joined: May 2009
Reputation:
30
So, looks like setting 'playcount' for tvshows does the job and calculates the unwatched.. this sets the counts in the Info dialog properly
Which I didn't expect since the description for playcount for listItem says:
playcount : integer (2) - number of times this item has been played
Also, is it not odd that you need to set 2 properties and 1 infolabel so that they show up in all areas? Maybe I should throw this Q to the Confluence forum?