2013-10-21, 14:10
Anybody have any idea why the following doesnt work?
If it's in the skin
<onclick>PlayMedia(plugin://plugin.video.plexbmc?url=http://192.168.0.20:32400/library/metadata/21995&mode=11&t=7260639398)</onclick>
works, but now I'm trying to use xbmcgui.listitem with..
where path_to_play is also PlayMedia(plugin://plugin.video.plexbmc?url=http://192.168.0.20:32400/library/metadata/21995&mode=11&t=7260639398) but this doesn't work
Ay ideas?
*edit*
From what I have read, you can't pass PlayMedia as part of the path, and would have to call the plugin itself to initiate the playmedia, ive tried the following:
Changing the path to plugin://plugin.video.plexbmc?playtype=video&url=http://192.168.0.20:32400/library/metadata/21995&mode=11&t=7260639398
and then in the plugin
but I'm obviously doing it in the wrong place and it doesnt work, it doesn't even hit the first printDebug
If it's in the skin
<onclick>PlayMedia(plugin://plugin.video.plexbmc?url=http://192.168.0.20:32400/library/metadata/21995&mode=11&t=7260639398)</onclick>
works, but now I'm trying to use xbmcgui.listitem with..
Code:
def add_listitem(item, thumb, path_to_play):
listitem = xbmcgui.ListItem('%s %s - %s' %(item.get('title','Unknown').encode('UTF-8'),item.get('year','Unknown').encode('UTF-8'), item.get('rating','Unknown').encode('UTF-8')), thumbnailImage=thumb, path=path_to_play)
return listitem
where path_to_play is also PlayMedia(plugin://plugin.video.plexbmc?url=http://192.168.0.20:32400/library/metadata/21995&mode=11&t=7260639398) but this doesn't work
Ay ideas?
*edit*
From what I have read, you can't pass PlayMedia as part of the path, and would have to call the plugin itself to initiate the playmedia, ive tried the following:
Changing the path to plugin://plugin.video.plexbmc?playtype=video&url=http://192.168.0.20:32400/library/metadata/21995&mode=11&t=7260639398
and then in the plugin
Code:
try:
params=get_params(sys.argv[2])
except:
params={}
playtype_url=params.get('playtype',None)
if playtype_url:
printDebug("hit playtype: %s" % playtype_url )
url=params.get('url',None)
mode=params.get('mode',None)
t=params.get('t',None)
pluginPlay(playtype_url, url, mode, t)
def pluginPlay(playtype, url, mode, t):
printDebug("hit pluginPlay: %s %s %s %s" %(playtype, url, mode, t) )
if(playtype == "video"):
#PlayMedia(plugin://plugin.video.plexbmc?url=%s&mode=%s&t=%s%s)" % ( getLinkURL('http://'+server_address,media,server_address), _MODE_PLAYSHELF, randomNumber, aToken)
ActivateWindow(Weather)
but I'm obviously doing it in the wrong place and it doesnt work, it doesn't even hit the first printDebug