Beispiel #1
0
def loadVideos(url,name,request_obj, response_obj):

        #YOUTUBE
        try:
                if re.search('youtube', url, re.IGNORECASE):
                    videoUrl=ParseYoutube(url)
                    playVideo("play",videoUrl)
                    return "skip"
        except: pass
        

        #Resolveurl
        try:
                PreProcessor.prepareVideoItem(request_obj, response_obj)
                SnapVideo.addPlaylistVideosInfo(request_obj, response_obj)
                SnapVideo.addVideoInfo(request_obj, response_obj)
        except: pass
Beispiel #2
0
def PlaymyvideoList(request_obj, response_obj):
        
        myplaylist = request_obj.get_data()['videoPlayListItems']
        try:
                if len(myplaylist) > 0 and re.search('youtube', myplaylist[0]['videoLink'], re.IGNORECASE):
                    playlist = xbmc.PlayList(xbmc.PLAYLIST_VIDEO)
                    playlist.clear()

                    for videoitem in myplaylist:
                        liz = xbmcgui.ListItem('[B]PLAY VIDEO[/B]', thumbnailImage="")
                        videoUrl = ParseYoutube(videoitem['videoLink'])
                        
                        playlist.add(url=videoUrl, listitem=liz)
                    xbmcPlayer = xbmc.Player()
                    xbmcPlayer.play(playlist)
                    return "skip"
        except: pass
        #Resolveurl
        try:
                PreProcessor.preparePlayListItems(request_obj, response_obj)
                SnapVideo.addPlaylistVideosInfo(request_obj, response_obj)
                SnapVideo.addVideoInfo(request_obj, response_obj)
        except: pass