示例#1
0
    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)
示例#2
0
        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
示例#3
0
    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)
示例#4
0
        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
示例#5
0
 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)
示例#6
0
 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)