コード例 #1
0
def VIPLink(mname,murl,thumb):
        main.GA(mname,"Watched")
        ok=True
        namelist=[]
        urllist=[]
        playlist = xbmc.PlayList(xbmc.PLAYLIST_VIDEO)
        playlist.clear()
        if '</regex>'in murl: 
                murl=main.doRegex(murl)
        match=re.compile('<sublink>(.+?)</sublink>').findall(murl)
        if match:
                i=1
                for url in match:
                        name= 'Link '+str(i)
                        namelist.append(name)        
                        urllist.append(url)
                        i=i+1
                dialog = xbmcgui.Dialog()
                answer =dialog.select("Pick A Link", namelist)
                if answer != -1:
                        murl=urllist[int(answer)]
                        xbmc.executebuiltin("XBMC.Notification(Please Wait!,Opening Link,5000)")
                else:
                      return
        
        stream_url = murl
        listitem = xbmcgui.ListItem(thumbnailImage=thumb)
        infoL={'Title': mname, 'Genre': 'Live'} 
        from resources.universal import playbackengine
        player = playbackengine.PlayWithoutQueueSupport(resolved_url=stream_url, addon_id=addon_id, video_type='movie', title=mname,season='', episode='', year='',img=thumb,infolabels=infoL, watchedCallbackwithParams='',imdb_id='')
        #WatchHistory
        if selfAddon.getSetting("whistory") == "true":
            wh.add_item(mname+' '+'[COLOR green]Live[/COLOR]', sys.argv[0]+sys.argv[2], infolabels='', img=thumb, fanart='', is_folder=False)
        player.KeepAlive()
        return ok
コード例 #2
0
def LINK(mname, murl, thumb):
    main.GA(mname, "Watched")
    ok = True
    playlist = xbmc.PlayList(xbmc.PLAYLIST_VIDEO)
    playlist.clear()
    if '</regex>' in murl:
        murl = main.doRegex(murl)
    stream_url = main.resolve_url(murl)
    listitem = xbmcgui.ListItem(thumbnailImage=thumb)
    infoL = {'Title': mname, 'Genre': 'Custom'}
    from resources.universal import playbackengine
    player = playbackengine.PlayWithoutQueueSupport(
        resolved_url=stream_url,
        addon_id=addon_id,
        video_type='movie',
        title=mname,
        season='',
        episode='',
        year='',
        img=thumb,
        infolabels=infoL,
        watchedCallbackwithParams='',
        imdb_id='')

    #WatchHistory
    if selfAddon.getSetting("whistory") == "true":
        wh.add_item(mname + ' ' + '[COLOR green]Custom Channel[/COLOR]',
                    sys.argv[0] + sys.argv[2],
                    infolabels='',
                    img=thumb,
                    fanart='',
                    is_folder=False)
    return ok
コード例 #3
0
ファイル: countries.py プロジェクト: alejusar/starthere
def COUNTRIESLink(mname,url,thumb):
        ok = True
        if '.f4m'in url:
                from resources.universal import F4mProxy
                player=F4mProxy.f4mProxyHelper()
                proxy=None
                use_proxy_for_chunks=False
                player.playF4mLink(url, mname, proxy, use_proxy_for_chunks,'',thumb)
                if selfAddon.getSetting("whistory") == "true":
                    from resources.universal import watchhistory
                    wh = watchhistory.WatchHistory('plugin.video.movie25')
                    wh.add_item(mname+' '+'[COLOR green]My Country[/COLOR]', sys.argv[0]+sys.argv[2], infolabels='', img=thumb, fanart='', is_folder=False)
        else:
                if '</regex>'in url:
                        url=main.doRegex(url)
                stream_url = url     
                playlist = xbmc.PlayList(xbmc.PLAYLIST_VIDEO)
                playlist.clear()
                listitem = xbmcgui.ListItem(thumbnailImage=thumb)
                infoL={'Title': mname, 'Genre': 'Live'} 
                from resources.universal import playbackengine
                player = playbackengine.PlayWithoutQueueSupport(resolved_url=stream_url, addon_id=addon_id, video_type='movie', title=mname,season='', episode='', year='',img=thumb,infolabels=infoL, watchedCallbackwithParams='',imdb_id='')

                #WatchHistory
                if selfAddon.getSetting("whistory") == "true":
                    from resources.universal import watchhistory
                    wh = watchhistory.WatchHistory('plugin.video.movie25')
                    wh.add_item(mname+' '+'[COLOR green]My Country[/COLOR]', sys.argv[0]+sys.argv[2], infolabels='', img=thumb, fanart='', is_folder=False)
        return ok
コード例 #4
0
def COUNTRIESLink(mname,url,thumb):
        ok = True
        if '.f4m'in url:
                from resources.universal import F4mProxy
                player=F4mProxy.f4mProxyHelper()
                proxy=None
                use_proxy_for_chunks=False
                player.playF4mLink(url, mname, proxy, use_proxy_for_chunks,'',thumb)
                if selfAddon.getSetting("whistory") == "true":
                    from resources.universal import watchhistory
                    wh = watchhistory.WatchHistory('plugin.video.movie25')
                    wh.add_item(mname+' '+'[COLOR green]My Country[/COLOR]', sys.argv[0]+sys.argv[2], infolabels='', img=thumb, fanart='', is_folder=False)
        else:
                if '</regex>'in url:
                        url=main.doRegex(url)
                stream_url = url     
                playlist = xbmc.PlayList(xbmc.PLAYLIST_VIDEO)
                playlist.clear()
                listitem = xbmcgui.ListItem(thumbnailImage=thumb)
                infoL={'Title': mname, 'Genre': 'Live'} 
                from resources.universal import playbackengine
                player = playbackengine.PlayWithoutQueueSupport(resolved_url=stream_url, addon_id=addon_id, video_type='movie', title=mname,season='', episode='', year='',img=thumb,infolabels=infoL, watchedCallbackwithParams='',imdb_id='')

                #WatchHistory
                if selfAddon.getSetting("whistory") == "true":
                    from resources.universal import watchhistory
                    wh = watchhistory.WatchHistory('plugin.video.movie25')
                    wh.add_item(mname+' '+'[COLOR green]My Country[/COLOR]', sys.argv[0]+sys.argv[2], infolabels='', img=thumb, fanart='', is_folder=False)
        return ok
コード例 #5
0
def VIPLink(mname, murl, thumb):
    main.GA(mname, "Watched")
    ok = True
    namelist = []
    urllist = []
    playlist = xbmc.PlayList(xbmc.PLAYLIST_VIDEO)
    playlist.clear()
    if '.f4m' in murl:
        from resources.universal import F4mProxy
        player = F4mProxy.f4mProxyHelper()
        proxy = None
        use_proxy_for_chunks = False
        player.playF4mLink(murl, mname, proxy, use_proxy_for_chunks, '', thumb)
        if selfAddon.getSetting("whistory") == "true":
            from resources.universal import watchhistory
            wh = watchhistory.WatchHistory('plugin.video.movie25')
            wh.add_item(mname + ' ' + '[COLOR green]Live[/COLOR]',
                        sys.argv[0] + sys.argv[2],
                        infolabels='',
                        img=thumb,
                        fanart='',
                        is_folder=False)
    else:
        if '</regex>' in murl:
            murl = main.doRegex(murl)
        match = re.compile('<sublink>(.+?)</sublink>').findall(murl)
        if match:
            i = 1
            for url in match:
                name = 'Link ' + str(i)
                namelist.append(name)
                urllist.append(url)
                i = i + 1
            dialog = xbmcgui.Dialog()
            answer = dialog.select("Pick A Link", namelist)
            if answer != -1:
                murl = urllist[int(answer)]
                xbmc.executebuiltin(
                    "XBMC.Notification(Please Wait!,Opening Link,5000)")
            else:
                return

        stream_url = murl
        listitem = xbmcgui.ListItem(thumbnailImage=thumb)
        listitem.setInfo('video', {'Title': mname, 'Genre': 'Live'})

        playlist.add(stream_url, listitem)
        xbmcPlayer = xbmc.Player()
        xbmcPlayer.play(playlist)  #WatchHistory
        if selfAddon.getSetting("whistory") == "true":
            from resources.universal import watchhistory
            wh = watchhistory.WatchHistory('plugin.video.movie25')
            wh.add_item(mname + ' ' + '[COLOR green]Live[/COLOR]',
                        sys.argv[0] + sys.argv[2],
                        infolabels='',
                        img=thumb,
                        fanart='',
                        is_folder=False)
    return ok
コード例 #6
0
ファイル: vipplaylist.py プロジェクト: alejusar/starthere
def VIPLink(mname,murl,thumb):
        #main.GA(mname,"Watched")
        ok=True
        namelist=[]
        urllist=[]
        playlist = xbmc.PlayList(xbmc.PLAYLIST_VIDEO)
        playlist.clear()
        if '.f4m'in murl:
                from resources.universal import F4mProxy
                player=F4mProxy.f4mProxyHelper()
                proxy=None
                use_proxy_for_chunks=False
                player.playF4mLink(murl, mname, proxy, use_proxy_for_chunks,'',thumb)
                if selfAddon.getSetting("whistory") == "true":
                    from resources.universal import watchhistory
                    wh = watchhistory.WatchHistory('plugin.video.movie25')
                    wh.add_item(mname+' '+'[COLOR green]Live[/COLOR]', sys.argv[0]+sys.argv[2], infolabels='', img=thumb, fanart='', is_folder=False)
        else:
                if '</regex>'in murl: 
                        murl=main.doRegex(murl)
                match=re.compile('<sublink>(.+?)</sublink>').findall(murl)
                if match:
                        i=1
                        for url in match:
                                name= 'Link '+str(i)
                                namelist.append(name)        
                                urllist.append(url)
                                i=i+1
                        dialog = xbmcgui.Dialog()
                        answer =dialog.select("Pick A Link", namelist)
                        if answer != -1:
                                murl=urllist[int(answer)]
                                xbmc.executebuiltin("XBMC.Notification(Please Wait!,Opening Link,5000)")
                        else:
                              return
                
                stream_url = murl
                listitem = xbmcgui.ListItem(thumbnailImage=thumb)
                listitem.setInfo('video', {'Title': mname, 'Genre': 'Live'} )
                
                playlist.add(stream_url,listitem)
                xbmcPlayer = xbmc.Player()
                xbmcPlayer.play(playlist)        #WatchHistory
                if selfAddon.getSetting("whistory") == "true":
                    from resources.universal import watchhistory
                    wh = watchhistory.WatchHistory('plugin.video.movie25')
                    wh.add_item(mname+' '+'[COLOR green]Live[/COLOR]', sys.argv[0]+sys.argv[2], infolabels='', img=thumb, fanart='', is_folder=False)
        return ok
コード例 #7
0
def LINK(mname,murl,thumb):
        main.GA(mname,"Watched")
        ok=True
        playlist = xbmc.PlayList(xbmc.PLAYLIST_VIDEO)
        playlist.clear()
        if '</regex>'in murl: 
                murl=main.doRegex(murl)
        stream_url = main.resolve_url(murl) 
        listitem = xbmcgui.ListItem(thumbnailImage=thumb)
        infoL={'Title': mname, 'Genre': 'Custom'} 
        from resources.universal import playbackengine
        player = playbackengine.PlayWithoutQueueSupport(resolved_url=stream_url, addon_id=addon_id, video_type='movie', title=mname,season='', episode='', year='',img=thumb,infolabels=infoL, watchedCallbackwithParams='',imdb_id='')

        #WatchHistory
        if selfAddon.getSetting("whistory") == "true":
            wh.add_item(mname+' '+'[COLOR green]Custom Channel[/COLOR]', sys.argv[0]+sys.argv[2], infolabels='', img=thumb, fanart='', is_folder=False)
        return ok