示例#1
0
def SKYSPORTSLink(mname, murl):
    main.GA("SkySports", "Watched")
    xbmc.executebuiltin("XBMC.Notification(Please Wait!,Playing Video,1500)")
    ok = True
    link = main.OPENURL(murl)
    link = link.replace('\r',
                        '').replace('\n',
                                    '').replace('\t',
                                                '').replace(' ', '')
    match = re.compile('data-video-id="([^"]+?)"').findall(link)
    vlink = 'http://cf.c.ooyala.com/' + match[0] + '/' + match[0] + '_1.f4m'
    desc = re.compile('<meta name="description" content="(.+?)"/>').findall(
        link)
    thumb = re.compile("<link rel='image_src' href='([^']+?)' />").findall(
        link)[0]
    print
    infoL = {"Title": mname, "Plot": desc[0]}
    from resources.universal import F4mProxy
    player = F4mProxy.f4mProxyHelper()
    proxy = None
    use_proxy_for_chunks = False
    player.playF4mLink(vlink, mname, proxy, use_proxy_for_chunks, '', thumb)
    if selfAddon.getSetting("whistory") == "true":
        from resources.universal import watchhistory
        wh = watchhistory.WatchHistory(addon_id)
        wh.add_item(mname + ' ' + '[COLOR green]SkySports[/COLOR]',
                    sys.argv[0] + sys.argv[2],
                    infolabels=infoL,
                    img=thumb,
                    fanart='',
                    is_folder=False)
示例#2
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
示例#3
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
示例#4
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
示例#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
def SKYSPORTSLink(mname,murl):
        xbmc.executebuiltin("XBMC.Notification(Please Wait!,Playing Video,1500)")
        ok= True
        link=main.OPENURL(murl)
        link=link.replace('\r','').replace('\n','').replace('\t','').replace('&nbsp;','')
        match=re.compile('data-video-id="([^"]+?)"').findall(link)
        vlink='http://cf.c.ooyala.com/'+match[0]+'/'+match[0]+'_1.f4m'
        desc=re.compile('<meta name="description" content="(.+?)"/>').findall(link)
        thumb=re.compile("<link rel='image_src' href='([^']+?)' />").findall(link)[0]
        print
        infoL={ "Title": mname, "Plot": desc[0]}
        from resources.universal import F4mProxy
        player=F4mProxy.f4mProxyHelper()
        proxy=None
        use_proxy_for_chunks=False
        player.playF4mLink(vlink, mname, proxy, use_proxy_for_chunks,'',thumb)
        if selfAddon.getSetting("whistory") == "true":
            from resources.universal import watchhistory
            wh = watchhistory.WatchHistory(addon_id)
            wh.add_item(mname+' '+'[COLOR green]SkySports[/COLOR]', sys.argv[0]+sys.argv[2], infolabels=infoL, img=thumb, fanart='', is_folder=False)