2012-11-02, 14:22
Hi,
I work on my personal plugin to parse flash video from web site and then put on my Rasppbery PI with raspbmc RC5 and XBMC 12.0-Alpha7. But now I try to make auto watching in this plugin, like pressed button "w" on the keyboard. Read previous posts in this forum and understand how to put "watched" in the setInfo, but I'm not understand how to check this values and after really play my flash video to mark as "watched", because if I not check this value "watched" or "playcount" all of my videos will marked.
def addActionListItem(item_params = {}, size = 0):
item = item_params.get
folder = False
#modify icon and thumbnail display
icon = "DefaultFolder.png"
thumbnail = item("thumbnail")
if (item("thumbnail", "DefaultFolder.png").find("http://") == -1):
thumbnail = "DefaultFolder.png"
listitem = xbmcgui.ListItem(item("Title"), iconImage=icon, thumbnailImage=thumbnail)
listitem.setInfo(type = 'video', infoLabels = {'Title': item("Title"), "playcount": 1, "watched": True})
url = buildItemUrl(item_params, '%s?' % sys.argv[0])
xbmcplugin.addDirectoryItem(handle, url=url, listitem=listitem, isFolder=folder, totalItems=size)
I work on my personal plugin to parse flash video from web site and then put on my Rasppbery PI with raspbmc RC5 and XBMC 12.0-Alpha7. But now I try to make auto watching in this plugin, like pressed button "w" on the keyboard. Read previous posts in this forum and understand how to put "watched" in the setInfo, but I'm not understand how to check this values and after really play my flash video to mark as "watched", because if I not check this value "watched" or "playcount" all of my videos will marked.
def addActionListItem(item_params = {}, size = 0):
item = item_params.get
folder = False
#modify icon and thumbnail display
icon = "DefaultFolder.png"
thumbnail = item("thumbnail")
if (item("thumbnail", "DefaultFolder.png").find("http://") == -1):
thumbnail = "DefaultFolder.png"
listitem = xbmcgui.ListItem(item("Title"), iconImage=icon, thumbnailImage=thumbnail)
listitem.setInfo(type = 'video', infoLabels = {'Title': item("Title"), "playcount": 1, "watched": True})
url = buildItemUrl(item_params, '%s?' % sys.argv[0])
xbmcplugin.addDirectoryItem(handle, url=url, listitem=listitem, isFolder=folder, totalItems=size)