def startPlayback(term, mode): global genre dialog = xbmcgui.DialogProgress() if mode == 1: global apiURL apiURL = '/user/' + term + '/topartists.xml' genre = dUser + '\'s' if mode == 2: apiURL = '/user/' + term + '/topartists.xml' genre = term + '\'s' if mode == 3: apiURL = '/artist/' + term + '/similar.xml' genre = term + '\'s similar artists' if mode == 4: apiURL = '/user/' + term + '/topartists.xml' genre = term print "start term", term print "start playback apiURL", apiURL print "start playback mode", mode info = access.getVideoInfo(apiURL) url = info[0] artist = info[1] title = info[2] thumb = info[3] objPL = xbmc.PlayList(1) objPL.clear() queueVid(url, artist, title, thumb) p.play(objPL)
def onPlayBackStarted(self): global apiURL global genre print 'playback started' #xbmc.executebuiltin('XBMC.ActivateWindow(fullscreenvideo)') info = access.getVideoInfo(apiURL) url = info[0] artist = info[1] title = info[2] thumb = info[3] queueVid(url, artist, title, thumb) while (1): try: xbmc.sleep(1000) self.getTime() except: print 'broke out of loop' self.onPlayBackStarted() objPL = xbmc.PlayList(1) p.play(objPL) break
def startPlayback(term,mode): global genre dialog = xbmcgui.DialogProgress() if mode==1: global apiURL apiURL='/user/'+term+'/topartists.xml' genre=dUser+'\'s' if mode==2: apiURL='/user/'+term+'/topartists.xml' genre=term+'\'s' if mode==3: apiURL='/artist/'+term+'/similar.xml' genre=term+'\'s similar artists' if mode==4: apiURL='/user/'+term+'/topartists.xml' genre=term print "start term",term print "start playback apiURL",apiURL print "start playback mode",mode info=access.getVideoInfo(apiURL) url=info[0] artist=info[1] title=info[2] thumb=info[3] objPL=xbmc.PlayList(1) objPL.clear() queueVid(url,artist,title,thumb) p.play(objPL)
def onPlayBackStarted(self): global apiURL global genre print 'playback started' #xbmc.executebuiltin('XBMC.ActivateWindow(fullscreenvideo)') info=access.getVideoInfo(apiURL) url=info[0] artist=info[1] title=info[2] thumb=info[3] queueVid(url,artist,title,thumb) while (1): try: xbmc.sleep(1000) self.getTime() except: print 'broke out of loop' self.onPlayBackStarted() objPL=xbmc.PlayList(1) p.play(objPL) break
def addToQueue(): global apiURL info = access.getVideoInfo(apiURL) url = info[0] artist = info[1] title = info[2] thumb = info[3] queueVid(url, artist, title, thumb)
def addToQueue(): global apiURL info=access.getVideoInfo(apiURL) url=info[0] artist=info[1] title=info[2] thumb=info[3] queueVid(url,artist,title,thumb)