예제 #1
0
파일: starplay.py 프로젝트: noba3/KoTos
def LINKSP5(mname, url):
    main.GA("Noobroom", "Watched")
    ok = True
    try:
        mname = mname.replace('[COLOR red]', '').replace('[/COLOR]', '')
        xbmc.executebuiltin(
            "XBMC.Notification(Please Wait!,Opening Link,9000)")

        stream_url = find_noobroom_video_url(url)
        infoLabels = main.GETMETAT(mname, '', '', '')
        video_type = 'movie'
        season = ''
        episode = ''
        img = infoLabels['cover_url']
        fanart = infoLabels['backdrop_url']
        imdb_id = infoLabels['imdb_id']
        infolabels = {
            'supports_meta': 'true',
            'video_type': video_type,
            'name': str(infoLabels['title']),
            'imdb_id': str(infoLabels['imdb_id']),
            'season': str(season),
            'episode': str(episode),
            'year': str(infoLabels['year'])
        }

        infoL = {
            'Title': infoLabels['title'],
            'Plot': infoLabels['plot'],
            'Genre': infoLabels['genre']
        }
        # play with bookmark
        from resources.universal import playbackengine
        player = playbackengine.PlayWithoutQueueSupport(
            resolved_url=stream_url,
            addon_id=addon_id,
            video_type=video_type,
            title=str(infoLabels['title']),
            season=str(season),
            episode=str(episode),
            year=str(infoLabels['year']),
            img=img,
            infolabels=infoL,
            watchedCallbackwithParams=main.WatchedCallbackwithParams,
            imdb_id=imdb_id)
        #WatchHistory
        if selfAddon.getSetting("whistory") == "true":
            from resources.universal import watchhistory
            wh = watchhistory.WatchHistory('plugin.video.movie25')
            wh.add_item(mname + ' ' + '[COLOR=FF67cc33]Starplay[/COLOR]',
                        sys.argv[0] + sys.argv[2],
                        infolabels=infolabels,
                        img=img,
                        fanart='',
                        is_folder=False)
        player.KeepAlive()
        return ok
    except Exception, e:
        main.ErrorReport(e)
        return ok
예제 #2
0
def YOULink(mname, url, thumb):
    ok = True
    main.GA("Youtube-List", "Watched")
    url = "plugin://plugin.video.youtube/?path=/root/video&action=play_video&videoid=" + url + "&hd=1"
    stream_url = url
    # play with bookmark
    player = playbackengine.PlayWithoutQueueSupport(
        resolved_url=stream_url,
        addon_id=addon_id,
        video_type='',
        title=mname,
        season='',
        episode='',
        year='',
        img=thumb,
        infolabels='',
        watchedCallbackwithParams=main.WatchedCallbackwithParams,
        imdb_id='')
    #WatchHistory
    if selfAddon.getSetting("whistory") == "true":
        wh.add_item(mname + ' ' + '[COLOR green]YoutubeChannel[/COLOR]',
                    sys.argv[0] + sys.argv[2],
                    infolabels='',
                    img=thumb,
                    fanart='',
                    is_folder=False)
    player.KeepAlive()
    return ok
예제 #3
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
예제 #4
0
파일: ibrod.py 프로젝트: noba3/KoTos
def USALINK(mname, murl, thumb):
    main.GA("USA Live", "Watched")
    ok = True
    playlist = xbmc.PlayList(xbmc.PLAYLIST_VIDEO)
    playlist.clear()
    xbmc.executebuiltin("XBMC.Notification(Please Wait!,Playing Link,1000)")
    stream_url = 'rtmp://mob.golive.pw:1935/tumadre/ playpath=' + murl + '.stream'
    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]USA Live[/COLOR]',
                    sys.argv[0] + sys.argv[2],
                    infolabels='',
                    img=thumb,
                    fanart='',
                    is_folder=False)
    return ok
예제 #5
0
파일: hadynz.py 프로젝트: noba3/KoTos
def LINK(mname, url, thumb):
    main.GA("ArabicStreams", "Watched")
    xbmc.executebuiltin("XBMC.Notification(Please Wait!,Opening Stream,3000)")
    stream_url = _get_channel_time_player(url)
    ok = True
    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":
        wh.add_item(mname + ' ' + '[COLOR green]ArabicStreams[/COLOR]',
                    sys.argv[0] + sys.argv[2],
                    infolabels='',
                    img=thumb,
                    fanart='',
                    is_folder=False)
    return ok
예제 #6
0
파일: icefilms.py 프로젝트: noba3/KoTos
def PLAYLINK(mname, murl):
    name = main.removeColoredText(mname)
    main.GA("IceFilms", "Watched")
    ok = True
    infoLabels = main.GETMETAT(mname, '', '', '')
    video_type = 'movie'
    season = ''
    episode = ''
    img = infoLabels['cover_url']
    fanart = infoLabels['backdrop_url']
    imdb_id = infoLabels['imdb_id']
    murl = resolveIceLink(murl)
    infolabels = {
        'supports_meta': 'true',
        'video_type': video_type,
        'name': str(infoLabels['title']),
        'imdb_id': str(infoLabels['imdb_id']),
        'season': str(season),
        'episode': str(episode),
        'year': str(infoLabels['year'])
    }
    try:
        xbmc.executebuiltin(
            "XBMC.Notification(Please Wait!,Resolving Link,3000)")
        stream_url = main.resolve_url(murl)
        infoL = {
            'Title': name,
            'Plot': infoLabels['plot'],
            'Genre': infoLabels['genre']
        }
        # play with bookmark
        from resources.universal import playbackengine
        player = playbackengine.PlayWithoutQueueSupport(
            resolved_url=stream_url,
            addon_id=addon_id,
            video_type=video_type,
            title=name,
            season=str(season),
            episode=str(episode),
            year=str(infoLabels['year']),
            img=img,
            infolabels=infoL,
            watchedCallbackwithParams=main.WatchedCallbackwithParams,
            imdb_id=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]IceFilms[/COLOR]',
                        sys.argv[0] + sys.argv[2],
                        infolabels=infolabels,
                        img=img,
                        fanart=fanart,
                        is_folder=False)
        player.KeepAlive()
        return ok
    except Exception, e:
        if stream_url != False:
            main.ErrorReport(e)
        return ok
예제 #7
0
def FOXSOCLink(mname,entry):
        main.GA("FoxSoccer","Watched")
        ok= True
        low=re.compile('<videoFile formatCode="102".+?<uri>([^<]+)</uri></videoFile>').findall(entry)
        med=re.compile('<videoFile formatCode="103".+?<uri>([^<]+)</uri></videoFile>').findall(entry)
        high=re.compile('<videoFile formatCode="104".+?<uri>([^<]+)</uri></videoFile>').findall(entry)
        if selfAddon.getSetting("tsn-qua") == "0":
            if len(high)>0:
                stream_url=high[0]
            else:
                stream_url=low[0]
        if selfAddon.getSetting("tsn-qua") == "1":
            if len(med)>0:
                stream_url=med[0]
            else:
                stream_url=low[0]
        if selfAddon.getSetting("tsn-qua") == "2":
            if len(low)>0:
                stream_url=low[0]
            else:
                stream_url=med[0]
        desc=re.compile('<description>([^<]+)</description>').findall(entry)
        thumb=re.compile('<file formatCode="2001".+?<uri>([^<]+)</uri></file>').findall(entry)
        infoL={ "Title": mname, "Plot": desc[0]}
        # play with bookmark
        player = playbackengine.PlayWithoutQueueSupport(resolved_url=stream_url, addon_id=addon_id, video_type='', title=mname,season='', episode='', year='',img=thumb[0],infolabels=infoL, watchedCallbackwithParams=main.WatchedCallbackwithParams,imdb_id='')
        #WatchHistory
        if selfAddon.getSetting("whistory") == "true":
            wh.add_item(mname+' '+'[COLOR green]Fox Soccer[/COLOR]', sys.argv[0]+sys.argv[2], infolabels='', img=thumb[0], fanart='', is_folder=False)
        player.KeepAlive()
        return ok
예제 #8
0
파일: yify.py 프로젝트: noba3/KoTos
def LINK(name, murl, thumb):
    xbmc.executebuiltin("XBMC.Notification(Please Wait!,Resolving Link,5000)")
    main.GA("Yify", "Watched")
    stream_url = False
    ok = True
    infoLabels = main.GETMETAT(name, '', '', thumb)
    video_type = 'movie'
    season = ''
    episode = ''
    img = infoLabels['cover_url']
    fanart = infoLabels['backdrop_url']
    imdb_id = infoLabels['imdb_id']
    infolabels = {
        'supports_meta': 'true',
        'video_type': video_type,
        'name': str(infoLabels['title']),
        'imdb_id': str(infoLabels['imdb_id']),
        'season': str(season),
        'episode': str(episode),
        'year': str(infoLabels['year'])
    }
    stream_url = main.resolve_url(murl)
    try:
        infoL = {
            'Title': infoLabels['title'],
            'Plot': infoLabels['plot'],
            'Genre': infoLabels['genre'],
            'originaltitle': infoLabels['metaName']
        }
        # play with bookmark
        from resources.universal import playbackengine
        if stream_url: main.CloseAllDialogs()
        player = playbackengine.PlayWithoutQueueSupport(
            resolved_url=stream_url,
            addon_id=addon_id,
            video_type=video_type,
            title=infoLabels['title'],
            season=season,
            episode=episode,
            year=str(infoLabels['year']),
            img=img,
            infolabels=infoL,
            watchedCallbackwithParams=main.WatchedCallbackwithParams,
            imdb_id=imdb_id)
        #WatchHistory
        if selfAddon.getSetting("whistory") == "true":
            from resources.universal import watchhistory
            wh = watchhistory.WatchHistory(addon_id)
            wh.add_item(name + ' ' + '[COLOR green]Yify[/COLOR]',
                        sys.argv[0] + sys.argv[2],
                        infolabels='',
                        img=img,
                        fanart='',
                        is_folder=False)
        player.KeepAlive()
        return ok
    except Exception, e:
        if stream_url != False:
            main.ErrorReport(e)
        return ok
예제 #9
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
예제 #10
0
파일: sportspack.py 프로젝트: noba3/KoTos
def LINK(mname, murl, thumb):
    main.GA("SportsPack", "Watched")
    stream_url = False
    xbmc.executebuiltin("XBMC.Notification(Please Wait!,Opening Stream,3000)")
    ok = True
    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":
        from resources.universal import watchhistory
        wh = watchhistory.WatchHistory('plugin.video.movie25')
        wh.add_item(mname + ' ' + '[COLOR green]SportsPack[/COLOR]',
                    sys.argv[0] + sys.argv[2],
                    infolabels='',
                    img=thumb,
                    fanart='',
                    is_folder=False)
    return ok
예제 #11
0
파일: livestation.py 프로젝트: noba3/KoTos
def LivestationLink2(mname,murl,thumb):
        main.GA("Livestation-"+mname,"Watched")
        ok=True
        namelist=[]
        urllist=[]
        playlist = xbmc.PlayList(xbmc.PLAYLIST_VIDEO)
        playlist.clear()
        if 'class="ga_track"' in murl:                
                match= re.findall('<a href="([^"]+?)" class="ga_track" data-action="([^"]+?)"',murl)
                for url,name in match:
                        url='http://www.livestation.com'+url
                        namelist.append(name)
                        urllist.append(url)
                dialog = xbmcgui.Dialog()
                answer =dialog.select("Pick A Language", namelist)
                if answer != -1:
                        murl=urllist[int(answer)]
        link=main.OPENURL(murl)
        link=link.replace('\r','').replace('\n','').replace('\t','').replace('&nbsp;','')
        match= re.compile('ipadUrl: "([^"]+?)",').findall(link)
        if match:
                stream_url =match[0].replace('b_,264,528,828,','b_528')
        xbmc.executebuiltin("XBMC.Notification(Please Wait!,Playing Link,1000)")
        
        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]Livestation[/COLOR]', sys.argv[0]+sys.argv[2], infolabels='', img=thumb, fanart='', is_folder=False)
        return ok
예제 #12
0
def PLAYLINK(mname, murl, thumb):
    ok = True
    main.GA("Live", "SportsAccess")
    stream_url = get_link(murl)
    playlist = xbmc.PlayList(xbmc.PLAYLIST_VIDEO)
    playlist.clear()
    listitem = xbmcgui.ListItem(thumbnailImage=thumb)
    infoL = {'Title': mname, 'Genre': 'Live'}
    from resources.universal import playbackengine, watchhistory
    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='')
    wh = watchhistory.WatchHistory('plugin.video.movie25')
    #WatchHistory
    if selfAddon.getSetting("whistory") == "true":
        wh.add_item(mname + ' ' + '[COLOR green]' + prettyName + '[/COLOR]',
                    sys.argv[0] + sys.argv[2],
                    infolabels='',
                    img=thumb,
                    fanart='',
                    is_folder=False)
    return ok
예제 #13
0
def LINK(mname,murl):
        ok=True
        if re.findall('(.+?)\ss(\d+)e(\d+)\s',mname,re.I):
                infoLabels =main.GETMETAEpiT(mname,'','')
                video_type='episode'
                season=infoLabels['season']
                episode=infoLabels['episode']
        elif re.findall('Season(.+?)Episode([^<]+)',mname,re.I):
                infoLabels =main.GETMETAEpiT(mname,'','')
                video_type='episode'
                season=infoLabels['season']
                episode=infoLabels['episode']
        else:
                infoLabels =main.GETMETAT(mname,'','','')
                video_type='movie'
                season=''
                episode=''
        img=infoLabels['cover_url']
        fanart =infoLabels['backdrop_url']
        imdb_id=infoLabels['imdb_id']
        infolabels = { 'supports_meta' : 'true', 'video_type':video_type, 'name':str(infoLabels['title']), 'imdb_id':str(infoLabels['imdb_id']), 'season':str(season), 'episode':str(episode), 'year':str(infoLabels['year']) }
        stream_url = murl
        infoL={'Title': infoLabels['title'], 'Plot': infoLabels['plot'], 'Genre': infoLabels['genre']}
        # play with bookmark
        player = playbackengine.PlayWithoutQueueSupport(resolved_url=stream_url, addon_id=addon_id, video_type=video_type, title=str(infoLabels['title']),season=str(season), episode=str(episode), year=str(infoLabels['year']),img=img,infolabels=infoL, watchedCallbackwithParams=main.WatchedCallbackwithParams,imdb_id=imdb_id)
        #WatchHistory
        if selfAddon.getSetting("whistory") == "true":
            wh.add_item(mname+' '+'[COLOR green]DownloadedContent[/COLOR]', sys.argv[0]+sys.argv[2], infolabels=infolabels, img=img, fanart=fanart, is_folder=False)
        player.KeepAlive()
        return ok
예제 #14
0
def LINKFS(name,murl):
        xbmc.executebuiltin("XBMC.Notification(Please Wait!,Resolving Link,5000)")
        main.GA("SokroStream","Watched")
        stream_url = False
        ok=True
        infoLabels =main.GETMETAT(name,'','','')
        video_type='movie'
        season=''
        episode=''
        img=infoLabels['cover_url']
        fanart =infoLabels['backdrop_url']
        imdb_id=infoLabels['imdb_id']
        infolabels = { 'supports_meta' : 'true', 'video_type':video_type, 'name':str(infoLabels['title']), 'imdb_id':str(infoLabels['imdb_id']), 'season':str(season), 'episode':str(episode), 'year':str(infoLabels['year']) }  
        if 'frenchstream'in murl:
            murl=GetLink(murl)
        stream_url = main.resolve_url(murl)
        print stream_url
        try:
                    listitem = xbmcgui.ListItem(thumbnailImage=img)
                    listitem.setInfo('video', {'Title': name, 'Year': ''} )         
                
                    infoL={'Title': infoLabels['title'], 'Plot': infoLabels['plot'], 'Genre': infoLabels['genre']}
                    # play with bookmark
                    player = playbackengine.PlayWithoutQueueSupport(resolved_url=stream_url, addon_id=addon_id, video_type=video_type, title=infoLabels['title'],season=season, episode=episode, year=str(infoLabels['year']),img=img,infolabels=infoL, watchedCallbackwithParams=main.WatchedCallbackwithParams,imdb_id=imdb_id)
                    #WatchHistory
                    if selfAddon.getSetting("whistory") == "true":
                        wh.add_item(name+' '+'[COLOR green]SokroStream[/COLOR]', sys.argv[0]+sys.argv[2], infolabels='', img=img, fanart='', is_folder=False)
                    player.KeepAlive()
                    return ok
        except Exception, e:
                    if stream_url != False:
                        main.ErrorReport(e)
                    return ok
예제 #15
0
def LINK(mname, murl, thumb):
    main.GA(mname, "Watched")
    ok = True
    namelist = []
    urllist = []
    playlist = xbmc.PlayList(xbmc.PLAYLIST_VIDEO)
    playlist.clear()
    stream_url = murl + '|User-Agent=PS4 libhttp/1.60 (PlayStation 4)'
    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]NHL[/COLOR]',
                    sys.argv[0] + sys.argv[2],
                    infolabels='',
                    img=thumb,
                    fanart='',
                    is_folder=False)
    return ok
예제 #16
0
파일: nationalgeo.py 프로젝트: noba3/KoTos
def LINKNG2(mname, murl):
    main.GA("NatGeo-" + mname, "Watched")
    MainUrl = 'http://video.nationalgeographic.com'
    link = main.OPENURL(murl)
    ok = True
    descm = re.compile("caption : .+?3E([^<]+)\u003C.+?\u003E',").findall(link)
    for desc in descm:
        desc = desc.replace('3E', '').replace('\u0027', "").replace(
            '\u0026#8212\u003B', ' ').replace('\u002D', ' ')
    thumbm = re.compile('poster : "http://".+?"([^<]+)",').findall(link)
    for thumb in thumbm:
        thumb = MainUrl + thumb
    vlink = re.compile("HTML5src:'(.+?)'").findall(link)
    for vidlink in vlink:
        flink = MainUrl + vidlink
        link2 = main.OPENURL(flink)
        match = re.compile('http://(.+?)\n').findall(link2)
        for vlink2 in match:
            vlink2 = 'http://' + vlink2
        if (len(match) == 0):
            xbmc.executebuiltin(
                "XBMC.Notification([B]Sorry![/B],No video link available,3000)"
            )
        else:
            bitmatch1 = re.compile('1800').findall(vlink2)
            if (len(bitmatch1) > 0):
                stream_url = vlink2
            else:
                stream_url = vlink2
            bitmatch2 = re.compile('660').findall(vlink2)
            if (len(bitmatch1) == 0) and (len(bitmatch2) > 0):
                stream_url = vlink2
            else:
                stream_url = vlink2

            infoL = {"Title": mname, "Plot": desc}
            # play with bookmark
            player = playbackengine.PlayWithoutQueueSupport(
                resolved_url=stream_url,
                addon_id=addon_id,
                video_type='',
                title=mname,
                season='',
                episode='',
                year='',
                img=thumb,
                infolabels=infoL,
                watchedCallbackwithParams=main.WatchedCallbackwithParams,
                imdb_id='')
            #WatchHistory
            if selfAddon.getSetting("whistory") == "true":
                wh.add_item(mname + ' ' + '[COLOR green]NatGeo[/COLOR]',
                            sys.argv[0] + sys.argv[2],
                            infolabels='',
                            img=thumb,
                            fanart='',
                            is_folder=False)
            player.KeepAlive()
        return ok
예제 #17
0
파일: catiii.py 프로젝트: noba3/KoTos
def LINK(name,murl,thumb):
    xbmc.executebuiltin("XBMC.Notification(Please Wait!,Resolving Link,5000)")
    main.GA(prettyName,"Watched")
    stream_url = False
    ok=True
    infoLabels =main.GETMETAT(name,'','',thumb)
    video_type='movie'
    season=''
    episode=''
    img=infoLabels['cover_url']
    fanart =infoLabels['backdrop_url']
    imdb_id=infoLabels['imdb_id']
    infolabels = { 'supports_meta' : 'true', 'video_type':video_type, 'name':str(infoLabels['title']), 'imdb_id':str(infoLabels['imdb_id']), 'season':str(season), 'episode':str(episode), 'year':str(infoLabels['year']) }
    link=main.OPENURL(murl)
    
    keys=re.findall('(?sim)vkey=(.+?)&',link)
    
    if keys:
        vurl='http://www.pinit.tv/embedplayer.php?width=620&height=465&vkey='+keys[0]+'&autoplay=true&subtitles='
        link=main.OPENURL(vurl)
        key=re.findall('href="(rtmp://[^"]+?)">Play',link)
        stream_url = key[0]
        id=re.findall('rtmp://.+?/pinit/(\d+)_.+?.mp4',key[0])[0]
    else:
        urllist=[]
        epiList=[]
        match=re.findall('(?sim)<a href="([^"]+?)" target="_blank">([^<]+?)</a>',link)
        for url,epi in match:
            urllist.append(url)
            epiList.append(epi)
        dialog = xbmcgui.Dialog()
        ret = dialog.select('[COLOR=FF67cc33][B]Select Episode[/COLOR][/B]',epiList)
        if ret == -1:
            return
        link2=main.OPENURL(urllist[ret])
        key=re.findall('href="(rtmp[^"]+?)">Play',link2)
        
        stream_url = key[0]
        id=re.findall('rtmp://.+?/pinit/(\d+)_.+?.mp4',key[0])[0]
        name=epiList[ret]
    try:
        infoL={'Title': name, 'Plot': infoLabels['plot'], 'Genre': infoLabels['genre'], 'originaltitle': infoLabels['metaName']}
        # play with bookmark
        from resources.universal import playbackengine
        if stream_url: main.CloseAllDialogs()
        player = playbackengine.PlayWithoutQueueSupport(resolved_url=stream_url, addon_id=addon_id, video_type=video_type, title=infoLabels['title'],season=season, episode=episode, year=str(infoLabels['year']),img=img,infolabels=infoL, watchedCallbackwithParams=main.WatchedCallbackwithParams,imdb_id=imdb_id)
        player.setSubtitles('http://www.pinit.tv/subs/'+id+'.srt')
        #WatchHistory
        if selfAddon.getSetting("whistory") == "true":
            from resources.universal import watchhistory
            wh = watchhistory.WatchHistory(addon_id)
            wh.add_item(name+' '+'[COLOR green]'+prettyName+'[/COLOR]', sys.argv[0]+sys.argv[2], infolabels='', img=img, fanart='', is_folder=False)
        player.KeepAlive()
        return ok
    except Exception, e:
        if stream_url != False:
            main.ErrorReport(e)
        return ok
예제 #18
0
def DISJRLink(mname, murl, thumb):
    ok = True
    playlist = xbmc.PlayList(xbmc.PLAYLIST_VIDEO)
    playlist.clear()
    if 'http' not in murl:
        murl = 'http://disneyjunior.com' + murl
    link = main.OPENURL(murl)
    stream_url = 'rtmp://videodolimgfs.fplive.net/videodolimg'
    video = re.compile(
        '{"bitrate":.+?,"format":"mp4","url":"mp4:(.+?)","id".+?}').findall(
            link)
    if video:
        if selfAddon.getSetting("disj-qua") == "0":
            vid = video[len(video) - 1]
        elif selfAddon.getSetting("disj-qua") == "1":
            vid = video[len(video) - 5]
        elif selfAddon.getSetting("disj-qua") == "2":
            vid = video[0]
        stream_url = stream_url + '/' + vid

    else:
        video = re.compile(
            '{"bitrate":.+?,"format":"applehttp","url":"(.+?)","id":.+?}'
        ).findall(link)
        if selfAddon.getSetting("disj-qua") == "0":
            vid = video[len(video) - 1]
        elif selfAddon.getSetting("disj-qua") == "1":
            vid = video[len(video) - 5]
        elif selfAddon.getSetting("disj-qua") == "2":
            vid = video[0]
        stream_url = vid

    listitem = xbmcgui.ListItem(mname, thumbnailImage=thumb)

    # play with bookmark
    player = playbackengine.PlayWithoutQueueSupport(
        resolved_url=stream_url,
        addon_id=addon_id,
        video_type='',
        title=mname,
        season='',
        episode='',
        year='',
        img=thumb,
        infolabels='',
        watchedCallbackwithParams=main.WatchedCallbackwithParams,
        imdb_id='')
    #WatchHistory
    if selfAddon.getSetting("whistory") == "true":
        wh.add_item(mname + ' ' + '[COLOR green]Disney jr[/COLOR]',
                    sys.argv[0] + sys.argv[2],
                    infolabels='',
                    img=thumb,
                    fanart='',
                    is_folder=False)
    player.KeepAlive()
    return ok
예제 #19
0
def LINKNG(mname,murl):
        link=main.OPENURL(murl)
        ok=True
        match=re.compile('property=".+?" content="(.+?)" />\n    <meta property=".+?" content=".+?" />\n    <meta property=".+?" content=".+?" />\n    <meta property=".+?" content=".+?" />\n\n\n    \n    <meta property=".+?" content=".+?" />\n\n    \n    <meta property=".+?" content="(.+?)" />\n\n    \n\n    <meta property=".+?" content="(.+?)" ').findall(link)
        for thumb, desc, vid in match:
                video=vid
        match2=re.compile('<source src="(.+?)" type="video/mp4" />').findall(link)
        for vidurl in match2:
                link2=main.OPENURL(vidurl)
                match3=re.compile('<video src="(.+?)1800.mp4"').findall(link2)
                for hd in match3:
                        hdlink=hd
                match8=re.compile('<video src="(.+?)1800(.+?).mp4"').findall(link2)
                for hd,hd1 in match8:
                        hdlink=hd
                        print hdlink
        match4=re.compile('shows').findall(murl)
        match5=re.compile('specials').findall(murl)
        match6=re.compile('extras').findall(murl)
        match7=re.compile('nat-geo-wild').findall(murl)
        if selfAddon.getSetting("bit-natgeo") == "0":
                try:
                        stream_url = hdlink + '1800.mp4'
                except:
                        stream_url = hdlink + '1800'+hd1+'.mp4'
        elif selfAddon.getSetting("bit-natgeo") == "1":
                if (len(match4)>0)or(len(match5)>0)or(len(match6)>0)or(len(match7)>0):
                        stream_url = hdlink + '660.mp4'
                else:
                        try:
                            stream_url = hdlink + '800.mp4'
                        except:
                            stream_url = hdlink + '800'+hd1+'.mp4'
        elif selfAddon.getSetting("bit-natgeo") == "2":
                if (len(match4)>0)or(len(match5)>0)or(len(match6)>0)or(len(match7)>0):
                        stream_url = hdlink + '220.mp4'
                else:
                        try:
                            stream_url = hdlink + '300.mp4'
                        except:
                            stream_url = hdlink + '300'+hd1+'.mp4'
        elif selfAddon.getSetting("bit-natgeo") == "3":
                try:
                        stream_url = video
                except:
                        stream_url = hdlink + '300.mp4'

        infoL={ "Title": mname, "Plot": desc}
        # play with bookmark
        player = playbackengine.PlayWithoutQueueSupport(resolved_url=stream_url, addon_id=addon_id, video_type='', title=mname,season='', episode='', year='',img=thumb,infolabels=infoL, watchedCallbackwithParams=main.WatchedCallbackwithParams,imdb_id='')
        #WatchHistory
        if selfAddon.getSetting("whistory") == "true":
            wh.add_item(mname+' '+'[COLOR green]NatGeo[/COLOR]', sys.argv[0]+sys.argv[2], infolabels='', img=thumb, fanart='', is_folder=False)
        player.KeepAlive()
        return ok
예제 #20
0
def LINK(mname, murl, thumb, desc):
    link = main.OPENURL(murl)
    link = main.unescapes(link)
    ok = True
    try:
        match = re.compile(
            'src="http://www.youtube.com/embed/(.+?).?autoplay=1&cc_load_policy=0.+?"'
        ).findall(link)
        if match:
            xbmc.executebuiltin(
                "XBMC.Notification(Please Wait!,Opening Link,3000)")
            stream_url = "plugin://plugin.video.youtube/?path=/root/video&action=play_video&videoid=" + match[
                0] + "&hd=1"
        match2 = re.compile(
            'src="http://player.vimeo.com/video/(.+?)"').findall(link)
        if match2:
            xbmc.executebuiltin(
                "XBMC.Notification(Please Wait!,Resolving Link,3000)")
            stream_url = main.resolve_url(str('http://vimeo.com/' + match2[0]))
            if (stream_url == False):
                xbmc.executebuiltin(
                    "XBMC.Notification(Sorry!,Link Cannot Be Resolved,5000)")
                return
        infoL = {'Title': mname, 'Plot': desc}
        # play with bookmark
        player = playbackengine.PlayWithoutQueueSupport(
            resolved_url=stream_url,
            addon_id=addon_id,
            video_type='',
            title=mname,
            season='',
            episode='',
            year='',
            img=thumb,
            infolabels=infoL,
            watchedCallbackwithParams=main.WatchedCallbackwithParams,
            imdb_id='')
        #WatchHistory
        if selfAddon.getSetting("whistory") == "true":
            wh.add_item(mname + ' ' + '[COLOR green]Doc-Wire[/COLOR]',
                        sys.argv[0] + sys.argv[2],
                        infolabels='',
                        img=thumb,
                        fanart='',
                        is_folder=False)
        player.KeepAlive()
        return ok
    except Exception, e:
        if stream_url != False:
            main.ErrorReport(e)
        else:
            xbmc.executebuiltin(
                "XBMC.Notification(Sorry!,Link deleted Or unplayable,5000)")
        return ok
예제 #21
0
파일: wildtv.py 프로젝트: noba3/KoTos
def LINKWT(mname, murl):
    main.GA("Wildtv-list", "Watched")
    xbmc.executebuiltin("XBMC.Notification(Please Wait!,Playing Link,3000)")
    link = main.OPENURL(murl)
    ok = True
    stream = re.compile('streamer: "(.+?)",').findall(link)
    Path = re.compile('file: "mp4:med/(.+?).mp4",').findall(link)
    if len(Path) > 0:
        desc = re.compile(
            '<meta name="description" content="(.+?)" />').findall(link)
        if len(desc) > 0:
            desc = desc[0]
        else:
            desc = ''
        thumb = re.compile('image: "(.+?)",').findall(link)
        if len(thumb) > 0:
            thumb = 'https:' + thumb[0]
        else:
            thumb = ''
        stream_url = stream[0]
        if selfAddon.getSetting("wild-qua") == "0":
            playpath = 'mp4:high/' + Path[0] + '.mp4'
        elif selfAddon.getSetting("wild-qua") == "1":
            playpath = 'mp4:med/' + Path[0] + '.mp4'
        playpath = playpath.replace('mp4:', '/')
        stream_url = stream_url + playpath
        infoL = {"Title": mname, "Plot": desc}
        # play with bookmark
        player = playbackengine.PlayWithoutQueueSupport(
            resolved_url=stream_url,
            addon_id=addon_id,
            video_type='',
            title=mname,
            season='',
            episode='',
            year='',
            img=thumb,
            infolabels=infoL,
            watchedCallbackwithParams=main.WatchedCallbackwithParams,
            imdb_id='')
        #WatchHistory
        if selfAddon.getSetting("whistory") == "true":
            wh.add_item(mname + ' ' + '[COLOR green]WildTv[/COLOR]',
                        sys.argv[0] + sys.argv[2],
                        infolabels='',
                        img=thumb,
                        fanart='',
                        is_folder=False)
        player.KeepAlive()
        return ok
    else:
        xbmc.executebuiltin("XBMC.Notification(Sorry!,Link not found,3000)")
예제 #22
0
def PLAYB(name, url):
    ok = True
    hname = name
    name = name.split('[COLOR blue]')[0]
    name = name.split('[COLOR red]')[0]
    infoLabels = main.GETMETAT(name, '', '', '')
    video_type = 'movie'
    season = ''
    episode = ''
    img = infoLabels['cover_url']
    fanart = infoLabels['backdrop_url']
    imdb_id = infoLabels['imdb_id']
    infolabels = {
        'supports_meta': 'true',
        'video_type': video_type,
        'name': str(infoLabels['title']),
        'imdb_id': str(infoLabels['imdb_id']),
        'season': str(season),
        'episode': str(episode),
        'year': str(infoLabels['year'])
    }

    try:
        xbmc.executebuiltin(
            "XBMC.Notification(Please Wait!,Resolving Link,3000)")
        stream_url = urlresolver.resolve(url)

        infoL = {
            'Title': infoLabels['metaName'],
            'Plot': infoLabels['plot'],
            'Genre': infoLabels['genre']
        }
        # play with bookmark
        from resources.universal import playbackengine
        player = playbackengine.PlayWithoutQueueSupport(
            resolved_url=stream_url,
            addon_id=addon_id,
            video_type=video_type,
            title=str(infoLabels['title']),
            season=str(season),
            episode=str(episode),
            year=str(infoLabels['year']),
            img=img,
            infolabels=infoL,
            watchedCallbackwithParams=main.WatchedCallbackwithParams,
            imdb_id=imdb_id)
        player.KeepAlive()
        return ok
    except Exception, e:
        if stream_url != False:
            main.ErrorReport(e)
        return ok
예제 #23
0
파일: fma.py 프로젝트: noba3/KoTos
def LINKFMA(mname,murl,thumb,desc):
        main.GA("FMA","Watched")
        sources = []
        ok=True
        playlist = xbmc.PlayList(xbmc.PLAYLIST_VIDEO)
        playlist.clear()
        xbmc.executebuiltin("XBMC.Notification(Please Wait!,Collecting hosts,3000)")
        infoLabels =main.GETMETAT(mname,'','',thumb)
        video_type='movie'
        season=''
        episode=''
        img=infoLabels['cover_url']
        fanart =infoLabels['backdrop_url']
        imdb_id=infoLabels['imdb_id']
        infolabels = { 'supports_meta' : 'true', 'video_type':video_type, 'name':str(infoLabels['title']), 'imdb_id':str(infoLabels['imdb_id']), 'season':str(season), 'episode':str(episode), 'year':str(infoLabels['year']) }
        link=main.OPENURL(murl)
        link=link.replace('\r','').replace('\n','').replace('\t','').replace('&nbsp;','')
        match=re.compile('<span class=\'.+?\'>(.+?)</span></p><div class=\'.+?\'><img src=\'.+?\' /></div><a class=\'.+?\' href="(.+?)"').findall(link)
        import urlresolver
        for host, url in match:
                durl='http://www.freemoviesaddict.com/'+url
                redirect=main.REDIRECT(durl)
                hosted_media = urlresolver.HostedMediaFile(url=redirect, title=host)
                sources.append(hosted_media)
                
        if (len(sources)==0):
                xbmc.executebuiltin("XBMC.Notification(Sorry!,Show doesn't have playable links,5000)")
                  
        else:
                source = urlresolver.choose_source(sources)
        if source != False:
            try:
                xbmc.executebuiltin("XBMC.Notification(Please Wait!,Resolving Link,3000)")
                stream_url = main.resolve_url(source.get_url())
                if(stream_url == False):
                    return
                
                infoL={'Title': infoLabels['title'], 'Plot': infoLabels['plot'], 'Genre': infoLabels['genre']}
                # play with bookmark
                from resources.universal import playbackengine
                player = playbackengine.PlayWithoutQueueSupport(resolved_url=stream_url, addon_id=addon_id, video_type=video_type, title=str(infoLabels['title']),season=str(season), episode=str(episode), year=str(infoLabels['year']),img=img,infolabels=infoL, watchedCallbackwithParams=main.WatchedCallbackwithParams,imdb_id=imdb_id)
                #WatchHistory
                if selfAddon.getSetting("whistory") == "true":
                    from resources.universal import watchhistory
                    wh = watchhistory.WatchHistory(addon_id)
                    wh.add_item(mname+' '+'[COLOR green]FMA[/COLOR]', sys.argv[0]+sys.argv[2], infolabels=infolabels, img=img, fanart=fanart, is_folder=False)
                player.KeepAlive()
                return ok
            except Exception, e:
                if stream_url != False:
                        main.ErrorReport(e)
                return ok
예제 #24
0
def PLAY(murl, name, index):
    print '>>>>>>>> INSIDE PLAY'
    ok = True
    hname = name
    # WORKING
    #murl = 'rtmp://live.server4sale.com/live/PTVnews swfUrl=http://live.server4sale.com:81/swfs/videoPlayer.swf live=true pageUrl=news.ptv.com.pk/livestreaming.asp'
    # END WORKING
    #murl = 'http://bglive-a.bitgravity.com/ndtv/247hi/live/native'
    murl = 'rtsp://46.249.213.87/broadcast/bollywoodaction2-tablet.3gp'
    murl = 'rtsp://46.249.213.87/broadcast/bollywoodhungama-tablet.3gp'
    murl = 'http://bglive-a.bitgravity.com/ndtv/247hi/live/native'
    if not murl: return False
    video_type = 'movie'
    season = ''
    episode = ''
    #img=infoLabels['cover_url']
    #fanart =infoLabels['backdrop_url']
    #imdb_id=infoLabels['imdb_id']
    #infolabels = { 'supports_meta' : 'true', 'video_type':video_type, 'name':str(infoLabels['title']), 'imdb_id':str(infoLabels['imdb_id']), 'season':str(season), 'episode':str(episode), 'year':str(infoLabels['year']) }

    try:
        xbmc.executebuiltin(
            "XBMC.Notification(Please Wait!,Resolving Link,3000)")
        stream_url = murl
        import urlresolver
        print 'INDIDE PLAY >>>>>>>>>>>>>>>>>>>>>: ' + stream_url
        stream_url = prepareVideoLink(stream_url)
        print 'INDIDE PLAY >>>>>>>>>>>>>>>>>>>>>: ' + stream_url

        #infoL={'Title': infoLabels['metaName'], 'Plot': infoLabels['plot'], 'Genre': infoLabels['genre']}
        # play with bookmark
        from resources.universal import playbackengine
        player = playbackengine.PlayWithoutQueueSupport(
            resolved_url=stream_url,
            addon_id=addon_id,
            video_type='live',
            title=name,
            season=season,
            episode=episode,
            year='')
        #WatchHistory
        #if selfAddon.getSetting("whistory") == "true":
        #    from resources.universal import watchhistory
        #    wh = watchhistory.WatchHistory(addon_id)
        #    wh.add_item(hname+' '+'[COLOR green]Movie25[/COLOR]', sys.argv[0]+sys.argv[2], infolabels=infolabels, img=img, fanart=fanart, is_folder=False)
        #player.KeepAlive()
        return ok
    except Exception, e:
        if stream_url != False:
            main.ErrorReport(e)
        return ok
예제 #25
0
파일: arabtv.py 프로젝트: noba3/KoTos
def LINKS3arabtv(mname, murl, thumb):
    main.GA("3Arabtv", "Watched")
    xbmc.executebuiltin("XBMC.Notification(Please Wait!,Resolving Link,5000)")
    link = main.OPENURL(murl)
    ok = True
    match = re.compile('<iframe id="playerframe" src="([^<]+)"',
                       re.DOTALL).findall(link)
    if match:
        stream_url = resolveVID(MAINURL +
                                match[0].replace('/inter.php?u=', ''))
    else:
        return
    try:
        if stream_url == False: return
        infoL = {
            'Title': mname,
            'Plot': '',
            'Genre': '',
            'originaltitle': mname
        }
        # play with bookmark
        stream_url = stream_url.replace(' ', '%20')
        from resources.universal import playbackengine
        player = playbackengine.PlayWithoutQueueSupport(
            resolved_url=stream_url,
            addon_id=addon_id,
            video_type='',
            title=mname,
            season='',
            episode='',
            year='',
            img=thumb,
            infolabels=infoL,
            watchedCallbackwithParams=main.WatchedCallbackwithParams,
            imdb_id='')
        #WatchHistory
        if selfAddon.getSetting("whistory") == "true":
            from resources.universal import watchhistory
            wh = watchhistory.WatchHistory(addon_id)
            wh.add_item(mname + ' ' + '[COLOR green]3Arabtv[/COLOR]',
                        sys.argv[0] + sys.argv[2],
                        infolabels='',
                        img=thumb,
                        fanart='',
                        is_folder=False)
        player.KeepAlive()
        return True
    except Exception, e:
        if stream_url != False: main.ErrorReport(e)
        return False
예제 #26
0
def PLAY(mname,murl,thumb):

        main.GA("Dramania","Watched") 
        ok=True
        
        r = re.findall('(.+?)\ss(\d+)e(\d+)\s',mname,re.I)
        if r:
            infoLabels =main.GETMETAEpiT(mname,'','')
            video_type='episode'
            season=infoLabels['season']
            episode=infoLabels['episode']
        else:
            infoLabels =main.GETMETAT(mname,'','',thumb)
            video_type='movie'
            season=''
            episode=''
        img=infoLabels['cover_url']
        fanart =infoLabels['backdrop_url']
        imdb_id=infoLabels['imdb_id']
        infolabels = { 'supports_meta' : 'true', 'video_type':video_type, 'name':str(infoLabels['title']), 'imdb_id':str(infoLabels['imdb_id']), 'season':str(season), 'episode':str(episode), 'year':str(infoLabels['year']) }
        try :
                xbmc.executebuiltin("XBMC.Notification(Please Wait!,Resolving Link,3000)")
                infoL={'Title': infoLabels['title'], 'Plot': infoLabels['plot'], 'Genre': infoLabels['genre']}
                if not video_type is 'episode': infoL['originalTitle']=main.removeColoredText(infoLabels['metaName'])
                from resources.universal import playbackengine
                
                if "'," in murl:
                    mname=main.removeColoredText(mname)
                    pl=xbmc.PlayList(1);pl.clear()
                    playlist = sorted(list(set(eval(murl))), key=lambda playlist: playlist[0])
                    for xname,link in playlist:
                        pl.add(getLink(link),xbmcgui.ListItem(mname+' '+xname,thumbnailImage=img))
                    xbmc.Player().play(pl)
                    while xbmc.Player().isPlaying():
                        xbmc.sleep(2500)
                else:
                    stream_url = getLink(murl)
                    # play with bookmark
                    player = playbackengine.PlayWithoutQueueSupport(resolved_url=stream_url, addon_id=addon_id, video_type=video_type, title=infoLabels['title'],season=season, episode=episode, year=str(infoLabels['year']),img=img,infolabels=infoL, watchedCallbackwithParams=main.WatchedCallbackwithParams,imdb_id=imdb_id)
                    #WatchHistory
                    if selfAddon.getSetting("whistory") == "true":
                        from resources.universal import watchhistory
                        wh = watchhistory.WatchHistory(addon_id)
                        wh.add_item(mname+' '+'[COLOR green]Dramania[/COLOR]', sys.argv[0]+sys.argv[2], infolabels=infolabels, img=infoLabels['cover_url'], fanart=infoLabels['backdrop_url'], is_folder=False)
                    player.KeepAlive()
                    return ok
        except Exception, e:
                if stream_url != False:
                        main.ErrorReport(e)
                return ok
예제 #27
0
파일: mlb.py 프로젝트: noba3/KoTos
def LINK(mname, murl, thumb):
    main.GA("MLB", "Watched")
    strmL = []
    link = main.OPENURL(murl)
    ok = True
    link = link.replace('\r',
                        '').replace('\n',
                                    '').replace('\t',
                                                '').replace('&nbsp;', '')
    m3u8 = re.compile(
        '''cdn="AKAMAI_FLASH_STREAM_ONDEMAND">([^<]*tablet.m3u8)<''').findall(
            link)
    link2 = main.OPENURL(m3u8[0])
    links = re.compile("(.+?m3u8)").findall(link2)
    stmUrl = m3u8[0].replace('master_tablet.m3u8', '')
    for strm in links:
        strmL.append(strm)
    if selfAddon.getSetting("disj-qua") == "0":
        stream_url = stmUrl + strmL[0]
    elif selfAddon.getSetting("disj-qua") == "1":
        stream_url = stmUrl + strmL[1]
    elif selfAddon.getSetting("disj-qua") == "2":
        stream_url = stmUrl + strmL[2]
    listitem = xbmcgui.ListItem(mname, 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 playbackengine, watchhistory
        wh = watchhistory.WatchHistory('plugin.video.movie25')
        wh.add_item(mname + ' ' + '[COLOR green]MLB[/COLOR]',
                    sys.argv[0] + sys.argv[2],
                    infolabels='',
                    img=thumb,
                    fanart='',
                    is_folder=False)
    return ok
예제 #28
0
파일: tubeplus.py 프로젝트: noba3/KoTos
def VIDEOLINKS(mname,url):
        ok=True
        hname=mname
        hname=hname.split('  online')[0]
        xbmc.executebuiltin("XBMC.Notification(Please Wait!,Opening Link,3000)")
        r=re.findall('Season(.+?)Episode([^<]+)',mname)
        if r:
            mname=mname.split(' [COLOR blue]')[0]
            infoLabels =main.GETMETAEpiT(mname,'','')
            video_type='episode'
            season=infoLabels['season']
            episode=infoLabels['episode']
        else:
            mname=mname.split(' [COLOR blue]')[0]
            infoLabels =main.GETMETAT(mname,'','','')
            video_type='movie'
            season=''
            episode=''
        img=infoLabels['cover_url']
        fanart =infoLabels['backdrop_url']
        imdb_id=infoLabels['imdb_id']
        infolabels = { 'supports_meta' : 'true', 'video_type':video_type, 'name':str(infoLabels['title']), 'imdb_id':str(infoLabels['imdb_id']), 'season':str(season), 'episode':str(episode), 'year':str(infoLabels['year']) }
        r=re.findall('xoxv(.+?)xoxe(.+?)xoxc',url)
        import urlresolver
        for hoster, url in r:
            source = urlresolver.HostedMediaFile(host=hoster, media_id=url)
        try :
            xbmc.executebuiltin("XBMC.Notification(Please Wait!,Resolving Link,3000)")
            stream_url = main.resolve_url(source.get_url())
            if(stream_url == False):
                return
                                
            infoL={'Title': infoLabels['title'], 'Plot': infoLabels['plot'], 'Genre': infoLabels['genre']}
            # play with bookmark
            
            from resources.universal import playbackengine
            player = playbackengine.PlayWithoutQueueSupport(resolved_url=stream_url, addon_id=addon_id, video_type=video_type, title=str(infoLabels['title']),season=str(season), episode=str(episode), year=str(infoLabels['year']),img=img,infolabels=infoL, watchedCallbackwithParams=main.WatchedCallbackwithParams,imdb_id=imdb_id)
            #WatchHistory
            if selfAddon.getSetting("whistory") == "true":
                from resources.universal import playbackengine, watchhistory
                wh = watchhistory.WatchHistory(addon_id)
                wh.add_item(hname+' '+'[COLOR=FF67cc33]TubePlus[/COLOR]', sys.argv[0]+sys.argv[2], infolabels=infolabels, img=str(img), fanart=str(fanart), is_folder=False)
            player.KeepAlive()
            return ok
        except Exception, e:
            if stream_url != False:
                    main.ErrorReport(e)
            return ok     
예제 #29
0
def LINKVD(name, murl, thumb):
    xbmc.executebuiltin("XBMC.Notification(Please Wait!,Resolving Link,3000)")
    main.GA("Video Documentaire", "Watched")
    stream_url = False
    ok = True
    link = main.OPENURL(murl)
    try:
        match = re.compile('''<iframe.+?src="(.+?)".+?</iframe>''',
                           re.DOTALL).findall(link)[0]
        if 'http:' not in match:
            match = 'http:' + match
        stream_url = main.resolve_url(match.replace('?rel=0', ''))
    except:
        xbmc.executebuiltin(
            "XBMC.Notification(Sorry!,Link Removed or Dead,3000)")

    try:
        listitem = xbmcgui.ListItem(thumbnailImage=thumb)
        listitem.setInfo('video', {'Title': name, 'Year': ''})

        infoL = {'Title': name, 'Plot': '', 'Genre': ''}
        # play with bookmark
        player = playbackengine.PlayWithoutQueueSupport(
            resolved_url=stream_url,
            addon_id=addon_id,
            video_type='',
            title=name,
            season='',
            episode='',
            year='',
            img=thumb,
            infolabels=infoL,
            watchedCallbackwithParams=main.WatchedCallbackwithParams,
            imdb_id='')
        #WatchHistory
        if selfAddon.getSetting("whistory") == "true":
            wh.add_item(name + ' ' + '[COLOR green]Video Documentaire[/COLOR]',
                        sys.argv[0] + sys.argv[2],
                        infolabels=infoL,
                        img=thumb,
                        fanart='',
                        is_folder=False)
        player.KeepAlive()
        return ok
    except Exception, e:
        if stream_url != False:
            main.ErrorReport(e)
        return ok
예제 #30
0
def LINKBB(mname,murl,thumb):
    ok=True
    main.GA("FitnessBlender","Watched")
    link=main.OPENURL(murl)
    link=link.replace('\r','').replace('\n','').replace('\t','').replace('&nbsp;','').replace('–','-')
    match=re.compile('src="http://www.youtube.com/embed/(.+?).?rel').findall(link)
    for url in match:
        url = "plugin://plugin.video.youtube/?path=/root/video&action=play_video&videoid="+url
    stream_url = url
    # play with bookmark
    player = playbackengine.PlayWithoutQueueSupport(resolved_url=stream_url, addon_id=addon_id, video_type='', title=mname,season='', episode='', year='',img=thumb,infolabels='', watchedCallbackwithParams=main.WatchedCallbackwithParams,imdb_id='')
    #WatchHistory
    if selfAddon.getSetting("whistory") == "true":
            wh.add_item(mname+' '+'[COLOR green]Fitness Blender[/COLOR]', sys.argv[0]+sys.argv[2], infolabels='', img=thumb, fanart='', is_folder=False)
    player.KeepAlive()
    return ok