Пример #1
0
def PLAYMEDIA(name,url):
    ok = True
    r = re.findall(r'(.+?)\[COLOR', name)
    name = r[0]
    r=re.findall('Season(.+?)Episode([^<]+)',name)
    if r:
        infoLabels =main.GETMETAEpiT(name,'','')
        video_type='episode'
        season=infoLabels['season']
        episode=infoLabels['episode']
    else:
        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:
        stream_url = urlresolver.resolve(url)
        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(hname+' '+'[COLOR=FF67cc33]TvRelease[/COLOR]', sys.argv[0]+sys.argv[2], infolabels=infolabels, img=str(img), fanart=str(fanart), is_folder=False)
        player.KeepAlive()
        return ok
    except:
        return ok
Пример #2
0
def OCLink(mname, url, thumb):
    main.GA("OC-List", "Watched")
    link = main.OPENURL(url)
    ok = True
    match = re.compile(
        '<video src="(.+?)" title="(.+?)" abstract="(.+?)" copyright="Outdoor Channel"'
    ).findall(link)
    for video, title, desc in match:
        print video
    stream_url = video
    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]Outdoor[/COLOR]',
                    sys.argv[0] + sys.argv[2],
                    infolabels='',
                    img=thumb,
                    fanart='',
                    is_folder=False)
    player.KeepAlive()
    return ok
Пример #3
0
def ESPNLink(mname, murl, thumb, desc):
    main.GA("ESPN-List", "Watched")
    ok = True

    stream_url = murl
    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]Espn[/COLOR]',
                    sys.argv[0] + sys.argv[2],
                    infolabels='',
                    img=thumb,
                    fanart='',
                    is_folder=False)
    player.KeepAlive()
    return ok
Пример #4
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
Пример #5
0
def LINKINT(mname, url):
    main.GA("Einthusan", "Watched")
    ok = True
    MainUrl = "http://www.einthusan.com/movies/"
    link = main.OPENURL(url)
    try:
        match = re.compile("'hd-2': { 'file': '(.+?)'").findall(link)
        thumb = re.compile('<img src="(../images.+?)"').findall(link)
        infoLabels = main.GETMETAT(mname, '', '', thumb[0])
        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'])
        }
        desc = ' '
        for stream_url in match:
            continue

        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(mname + ' ' + '[COLOR green]Einthusan[/COLOR]',
                        sys.argv[0] + sys.argv[2],
                        infolabels='',
                        img=MainUrl + thumb[0],
                        fanart='',
                        is_folder=False)
        player.KeepAlive()
        return ok
    except Exception, e:
        if stream_url != False:
            main.ErrorReport(e)
        return ok
Пример #6
0
def LINKWATCHS(mname,murl):
        main.GA("Watchseries","Watched")
        ok=True
        playlist = xbmc.PlayList(xbmc.PLAYLIST_VIDEO)
        playlist.clear()
        match=re.compile('(.+?)xocx(.+?)xocx').findall(murl)
        for hurl, durl in match:
                furl=geturl('http://watchseries.lt'+hurl)
        xbmc.executebuiltin("XBMC.Notification(Please Wait!,Checking Link,1500)")
        link=main.OPENURL(durl)
        link=link.replace('\r','').replace('\n','').replace('\t','').replace('&nbsp;','')
        match2=re.compile('<h1 class=".+?"><a href=".+?">.+?</a> - <a href="(.+?)" title=".+?">.+?</a>').findall(link)
        for xurl in match2:
                link2=main.OPENURL('http://watchseries.lt'+xurl)
                link2=link2.replace('\r','').replace('\n','').replace('\t','').replace('&nbsp;','')
        descr=re.compile('<b>Description :</b>(.+?)<').findall(link2)
        if len(descr)>0:
                desc=descr[0]
        else:
                desc=''
        thumbs=re.compile('<td style=".+?"><a href=".+?"><img src="(.+?)"').findall(link2)
        if len(thumbs)>0:
                thumb=thumbs[0]
        else:
                thumb=''
        genres=re.compile('<b>Genre: <a href=.+?>(.+?)</a>').findall(link2)
        if len(genres)>0:
                genre=genres[0]
        else:
                genre=''
        infoLabels =main.GETMETAEpiT(mname,thumb,desc)
        video_type='episode'
        season=infoLabels['season']
        episode=infoLabels['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']) }
        media = urlresolver.HostedMediaFile(furl)
        source = media
        try:
                if source:
                        xbmc.executebuiltin("XBMC.Notification(Please Wait!,Resolving Link,4000)")
                        stream_url = source.resolve()
                else:
                        stream_url = False  
                

                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]WatchSeries[/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)
                return ok
Пример #7
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
Пример #8
0
def LINKSP5(mname, url):
    main.GA("Starplay", "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
        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=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
Пример #9
0
def LINKNG(mname,murl):
        main.GA("NatGeo-"+mname,"Watched")
        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
Пример #10
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
Пример #11
0
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)")
Пример #12
0
def LINK(mname, murl, thumb):

    xbmc.executebuiltin("XBMC.Notification(Please Wait!,Playing Video,4000)")
    ok = True
    link = main.OPENURL(murl)
    link = main.unescapes(link)
    r = re.findall('player.releaseURL = "(.+?)";', link)
    if r:
        print r
        try:
            link = main.OPENURL(r[0])
            link = main.unescapes(link)
        except:
            xbmc.executebuiltin("XBMC.Notification(Sorry!,No Link Found,3000)")
            link = ''
        match = re.findall('<video src="(.+?)" title=.+?abstract="(.+?)"',
                           link)
        for vurl, desc in match:
            flv = re.findall('flv', vurl)
            if flv:
                vid = 'rtmp://cp74847.edgefcs.net/ondemand/' + vurl
            else:
                vid = vurl
            stream_url = vid
            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
            main.GA("GolfChannel", "Watched")
            if selfAddon.getSetting("whistory") == "true":
                wh.add_item(mname + ' ' + '[COLOR green]GolfChannel[/COLOR]',
                            sys.argv[0] + sys.argv[2],
                            infolabels='',
                            img=thumb,
                            fanart='',
                            is_folder=False)
            player.KeepAlive()
            return ok
    else:
        xbmc.executebuiltin("XBMC.Notification(Sorry!,No Link Found,3000)")
    return ok
Пример #13
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
Пример #14
0
def LINK (mname,murl,thumb):
        main.GA("MkvMovies","Watched")
        sources = []
        xbmc.executebuiltin("XBMC.Notification(Please Wait!,Collecting hosts,3000)")
        link=main.OPENURL(murl)
        ok=True
        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']) }
        match=re.compile('<a href="([^<]+)" rel="nofollow">Click Here to Download</a>').findall(link)
        for url in match:
                match2=re.compile('http://(.+?)/.+?').findall(url)
                for host in match2:
                    host = host.replace('www.','')
                match3=re.compile('rar').findall(url)
                if len(match3)==0:
                    hosted_media = urlresolver.HostedMediaFile(url=url, 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)
        try:
                if source:
                        xbmc.executebuiltin("XBMC.Notification(Please Wait!,Resolving Link,5000)")
                        stream_url = source.resolve()
                else:
                      stream_url = False
                      return
                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]MkvMovies[/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
Пример #15
0
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)
        for hoster, url in r:
            hosted_media = urlresolver.HostedMediaFile(host=hoster, media_id=url)
        source=hosted_media
        try :
            if source:
                    xbmc.executebuiltin("XBMC.Notification(Please Wait!,Resolving Link,3000)")
                    stream_url = source.resolve()
            else:
                    stream_url = False
                    return
                
            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(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     
Пример #16
0
def iWatchLINKB(mname,url):
        main.GA("iWatchonline","Watched")
        ok=True
        hname=mname
        xbmc.executebuiltin("XBMC.Notification(Please Wait!,Opening Link,3000)")
        mname=mname.split('   [COLOR red]')[0]
        r=re.findall('Season(.+?)Episode([^<]+)',mname)
        if r:
            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']) }
        link=main.OPENURL(url)
        link=main.unescapes(link)
        match=re.compile('<(?:iframe|pagespeed_iframe).+?src=\"(.+?)\"').findall(link)
        hosted_media = urlresolver.HostedMediaFile(match[0])
        source=hosted_media
        try :
            if source:
                    xbmc.executebuiltin("XBMC.Notification(Please Wait!,Resolving Link,3000)")
                    stream_url = source.resolve()
            else:
                    stream_url = False
                    return
                
            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(hname+' '+'[COLOR green]iWatchonline[/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
Пример #17
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('&nbsp;','')
        match=re.compile('data-html5-video-url="(.+?)" >').findall(link)
        stream_url=match[0]
        desc=re.compile('<meta name="description" content="(.+?)"/>').findall(link)
        thumb=re.compile("<link rel='image_src' href='(.+?)' />").findall(link)
        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]SkySports[/COLOR]', sys.argv[0]+sys.argv[2], infolabels='', img=thumb[0], fanart='', is_folder=False)
        player.KeepAlive()
        return ok
Пример #18
0
def LINKBB(mname, murl, thumb):
    main.GA("BodyBuilding", "Watched")
    ok = True
    namelist = []
    urllist = []
    thumblist = []
    link = main.OPENURL(murl)
    link = link.replace('\r', '').replace('\n', '').replace('\t', '').replace(
        '&nbsp;', '').replace('img src="http://assets.bodybuilding.com', '')
    match = re.compile(
        '<div id=".+?" style="display:.+?">                <div id="(.+?)Video">                    <div class="BBCOMVideoEmbed" data-video-id="(.+?)" data-thumbnail-url="(.+?)"'
    ).findall(link)
    for gender, vidid, thumb in match:
        namelist.append(gender)
        urllist.append(vidid)
        thumblist.append(thumb)
    dialog = xbmcgui.Dialog()
    answer = dialog.select("Playlist", namelist)
    listitem = xbmcgui.ListItem(mname, thumbnailImage=thumblist[int(answer)])
    stream_url = "http://videocdn.bodybuilding.com/video/mp4/" + urllist[int(
        answer)] + "m.mp4"
    # 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]BodyBuilding[/COLOR]',
                    sys.argv[0] + sys.argv[2],
                    infolabels='',
                    img=thumb,
                    fanart='',
                    is_folder=False)
    player.KeepAlive()
    return ok
Пример #19
0
def PLAYAA(mname,murl,thumb):
        main. GA("AirAces-list","Watched")
        ok=True
        match=re.compile('([^<]+)xoxoc([^<]+)').findall(murl)
        for fid, filename in match:
            continue
        stream_url = 'rtmp://cp68811.edgefcs.net/ondemand/?auth=dbEc2aOaoa2dNd4c3dYabcPc7c4bQdObCcn-brnsbZ-4q-d9i-5'+fid+'=1234&slist=Canwest_Broadcast_Entertainment/'+filename+'.mp4'
        #playpath = 'mp4:Canwest_Broadcast_Entertainment/'+filename+'.mp4'       

        infoL={'Title': mname, 'Genre': 'AirAces'}
        #listitem.setProperty('PlayPath', playpath)

        # 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]Discovery[/COLOR]', sys.argv[0]+sys.argv[2], infolabels='', img=thumb, fanart='', is_folder=False)
        player.KeepAlive()
        return ok
Пример #20
0
def LINKWB(mname, murl):
    main.GA("WB", "Watched")
    ok = True
    url = 'http://metaframe.digitalsmiths.tv/v2/WBtv/assets/' + murl + '/partner/11?format=json'
    link = main.OPENURL(url)
    playlist = xbmc.PlayList(xbmc.PLAYLIST_VIDEO)
    playlist.clear()
    bit700 = re.compile('"bitrate": "700", "uri": "(.+?)"').findall(link)
    bit500 = re.compile('"bitrate": "500", "uri": "(.+?)"').findall(link)
    if (len(bit700) > 0):
        stream_url = bit700[0]
    else:
        stream_url = bit500[0]
    desc = re.compile('"description": "(.+?)", "rating"').findall(link)
    desc = desc[0].replace('\\', '')
    thumb = re.compile(
        '"images": .+?".+?": .+?"width": .+?, "uri": "(.+?)"').findall(link)
    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[0],
        infolabels=infoL,
        watchedCallbackwithParams=main.WatchedCallbackwithParams,
        imdb_id='')
    #WatchHistory
    if selfAddon.getSetting("whistory") == "true":
        wh.add_item(mname + ' ' + '[COLOR green]WB Kids[/COLOR]',
                    sys.argv[0] + sys.argv[2],
                    infolabels='',
                    img=thumb[0],
                    fanart='',
                    is_folder=False)
    player.KeepAlive()
    return ok
Пример #21
0
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
Пример #22
0
def LINKSP2B(mname,murl):
        main.GA("Newmyvideolinks","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,'','','')
            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']) }
        playlist = xbmc.PlayList(xbmc.PLAYLIST_VIDEO)
        playlist.clear()
        hosted_media = urlresolver.HostedMediaFile(murl)
        source = hosted_media
        try :
                if source:
                        xbmc.executebuiltin("XBMC.Notification(Please Wait!,Resolving Link,3000)")
                        stream_url = source.resolve()
                else:
                      stream_url = False
                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(mname+' '+'[COLOR green]NewmyVideoLink[/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
Пример #23
0
def PLAYBTV(mname,murl):
        furl=GETLINKBTV(murl)
        ok=True
        if furl=='':
                return ok
        else:
                infoLabels =main.GETMETAEpiT(mname,'','')
                video_type='episode'
                season=infoLabels['season']
                episode=infoLabels['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']) }
                media = urlresolver.HostedMediaFile(furl)
                source = media
                try:
                    if source:
                            xbmc.executebuiltin("XBMC.Notification(Please Wait!,Resolving Link,3000)")
                            stream_url = source.resolve()
                    else:
                            stream_url = False
                    

                    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]BTV[/COLOR]', sys.argv[0]+sys.argv[2], infolabels=infolabels, img=img, fanart='', is_folder=False)
                    player.KeepAlive()
                    return ok
                except Exception, e:
                        if stream_url != False:
                                main.ErrorReport(e)
                        return ok
Пример #24
0
def CHANNELCLink(mname, murl):
    main.GA("CC/Tv4", "Watched")
    sources = []
    xbmc.executebuiltin(
        "XBMC.Notification(Please Wait!,Collecting hosts,3000)")
    link = main.OPENURL(murl)
    ok = True
    playlist = xbmc.PlayList(xbmc.PLAYLIST_VIDEO)
    playlist.clear()
    site = re.findall('channelcut', murl)
    if len(site) > 0:
        match = re.compile('<p><a href="(.+?)" rel=".+?">.+?</a></p>').findall(
            link)
    else:
        match = re.compile('<td><a href="(.+?)" target="').findall(link)
    for url in match:
        match2 = re.compile('http://(.+?)/.+?').findall(url)
        for host in match2:
            host = host.replace('www.', '')
        hosted_media = urlresolver.HostedMediaFile(url=url, 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)
    try:
        if source:
            xbmc.executebuiltin(
                "XBMC.Notification(Please Wait!,Resolving Link,5000)")
            stream_url = source.resolve()
        else:
            stream_url = False
            return
        infoLabels = main.GETMETAEpiT(mname, '', '')
        video_type = 'episode'
        season = infoLabels['season']
        episode = infoLabels['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
        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]CC/Tv4[/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
Пример #25
0
def LINK(mname, murl):
    main.GA("dubzonline-" + mname, "Watched")
    sources = []
    ok = True

    link = main.OPENURL(murl)
    link = link.replace('\r',
                        '').replace('\n',
                                    '').replace('\t',
                                                '').replace('&nbsp;', '')
    match = re.compile(
        '''<span class='.+?'><b>.+?</b></span><iframe src="(.+?)"''').findall(
            link)
    for url in match:
        match2 = re.compile('http://(.+?)/.+?').findall(url)
        for host in match2:
            host = host.replace('www.', '')
            if host == 'putlocker.com' or host == 'sockshare.com':
                url = url.replace('embed', 'file')
        hosted_media = urlresolver.HostedMediaFile(url=url, 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)
    try:
        if source:
            stream_url = source.resolve()
        else:
            stream_url = False
            return

        # play with bookmark
        player = playbackengine.PlayWithoutQueueSupport(
            resolved_url=stream_url,
            addon_id=addon_id,
            video_type='',
            title=mname,
            season='',
            episode='',
            year='',
            img='',
            infolabels='',
            watchedCallbackwithParams=main.WatchedCallbackwithParams,
            imdb_id='')
        #WatchHistory
        if selfAddon.getSetting("whistory") == "true":
            wh.add_item(mname + ' ' + '[COLOR green]Dubzonline[/COLOR]',
                        sys.argv[0] + sys.argv[2],
                        infolabels='',
                        img='',
                        fanart='',
                        is_folder=False)
        player.KeepAlive()
        return ok
    except Exception, e:
        if stream_url != False:
            main.ErrorReport(e)
        return ok
Пример #26
0
def LINKINT3(name, murl, thumb):
    sources = []
    main.GA("Cinevip", "Watched")
    xbmc.executebuiltin(
        "XBMC.Notification(Please Wait!,Collecting Hosts,3000)")
    link = main.OPENURL(murl)
    link = link.replace('\r',
                        '').replace('\n',
                                    '').replace('\t',
                                                '').replace('&nbsp;', '')
    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'])
    }
    match = re.compile(
        'class=".+?">([^<]+)</span></td><td>([^<]+)</td><td>([^<]+)</td>.+?adf.ly/.+?/(.+?)"'
    ).findall(link)
    if len(match) == 0:
        match = re.compile(
            '<td><span class=".+?">.+?</span></td><td><span class=".+?">(.+?)</span></td><td>(.+?)</td><td>(.+?)</td>.+?<a .+?href=(.+?)>.+?</a>'
        ).findall(link)
    for host, lang, qua, url in match:
        print url
        url = url.replace('target="_blank"', '').replace('"', '')
        hosted_media = urlresolver.HostedMediaFile(
            url=url, title=host + ' [COLOR red]' + lang + '[/COLOR] ' + qua)
        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)
    try:
        if source:
            xbmc.executebuiltin(
                "XBMC.Notification(Please Wait!,Resolving Link,3000)")
            stream_url = source.resolve()

        else:
            stream_url = False
            return
        listitem = xbmcgui.ListItem(thumbnailImage=thumb)
        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]Cinevip[/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)
        return ok
Пример #27
0
def MLink(mname, murl, thumb):
    main.GA(mname, "Watched")
    ok = True
    xbmc.executebuiltin("XBMC.Notification(Please Wait!,Opening Link,5000)")
    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'])
    }
    hosted_media = urlresolver.HostedMediaFile(url=murl)
    try:
        if re.findall('billionuploads', murl, re.I):
            try:
                stream_url = main.resolve_billionuploads(murl)
            except:
                if hosted_media:
                    source = hosted_media
                    if source:
                        xbmc.executebuiltin(
                            "XBMC.Notification(Please Wait!,Resolving Link,5000)"
                        )
                        stream_url = source.resolve()
                    else:
                        stream_url = False
                        return
        elif re.findall('180upload', murl, re.I):
            try:
                stream_url = main.resolve_180upload(murl)
            except:
                if hosted_media:
                    source = hosted_media
                    if source:
                        xbmc.executebuiltin(
                            "XBMC.Notification(Please Wait!,Resolving Link,5000)"
                        )
                        stream_url = source.resolve()
                    else:
                        stream_url = False
                        return

        elif re.findall('veehd', murl, re.I):
            try:
                stream_url = main.resolve_veehd(murl)
            except:
                if hosted_media:
                    source = hosted_media
                    if source:
                        xbmc.executebuiltin(
                            "XBMC.Notification(Please Wait!,Resolving Link,5000)"
                        )
                        stream_url = source.resolve()
                    else:
                        stream_url = False
                        return
        elif re.findall('vidto', murl, re.I):
            try:
                stream_url = main.resolve_videto(murl)
            except:
                if hosted_media:
                    source = hosted_media
                    if source:
                        xbmc.executebuiltin(
                            "XBMC.Notification(Please Wait!,Resolving Link,5000)"
                        )
                        stream_url = source.resolve()
                    else:
                        stream_url = False
                        return
        elif re.findall('epicshare', murl, re.I):
            try:
                stream_url = main.resolve_epicshare(murl)
            except:
                if hosted_media:
                    source = hosted_media
                    if source:
                        xbmc.executebuiltin(
                            "XBMC.Notification(Please Wait!,Resolving Link,5000)"
                        )
                        stream_url = source.resolve()
                    else:
                        stream_url = False
                        return
        elif re.findall('lemuploads', murl, re.I):
            try:
                stream_url = main.resolve_lemupload(murl)
            except:
                if hosted_media:
                    source = hosted_media
                    if source:
                        xbmc.executebuiltin(
                            "XBMC.Notification(Please Wait!,Resolving Link,5000)"
                        )
                        stream_url = source.resolve()
                    else:
                        stream_url = False
                        return
        else:
            if hosted_media:
                source = hosted_media
                if source:
                    xbmc.executebuiltin(
                        "XBMC.Notification(Please Wait!,Resolving Link,5000)")
                    stream_url = source.resolve()
                else:
                    stream_url = False
                    return
            else:
                stream_url = murl
        infoL = {
            'Title': infoLabels['title'],
            'Plot': infoLabels['plot'],
            'Genre': infoLabels['genre'],
            'originaltitle': infoLabels['metaName']
        }
        # play with bookmark
        stream_url = stream_url.replace(' ', '%20')
        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]VIPlaylist[/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
Пример #28
0
def LINK(mname,murl,thumb,desc):
        
        ok=True
        playlist = xbmc.PlayList(xbmc.PLAYLIST_VIDEO)
        playlist.clear()
        link=main.unescapes(murl)
        match = re.compile('src="(.+?)"').findall(link)
        if len(match)==0:
            match = re.compile("src='(.+?)'").findall(link)
            if len(match)==0:
                r = re.findall('animefreak',murl)
                if r:
                        link=main.OPENURL(murl)
                        link=main.unescapes(link)
                        match = re.compile('src="http://www.animefreak.tv/sites/default/files/af/misc/player.swf.?file=(.+?)"').findall(link)
                        print 'HH1 '+match[0]
                        s = re.findall('http://.+?/(.+?).mp4.?(.+?)e=([^\&]+)',match[0])
                        for p1,p2,p3 in s:
                                p1=p1.replace('+','%20')
                                stream_url='http://78.152.42.214/'+p1+'.mp4?'+p2+'e='+p3

                nv = re.findall('novamov',murl)
                if nv:
                                stream_url = NovaWeed(murl)
                v = re.findall('videoweed',murl)
                if v:
                                stream_url = NovaWeed(murl)

                m = re.findall('mp4upload',murl)
                if m:
                                link=main.OPENURL(murl)
                                link=main.unescapes(link)
                                vw = re.compile("'file': '(.+?)',").findall(link)
                                stream_url = vw[0]

                vb = re.findall('videobam',murl)
                if vb:
                                link=main.OPENURL(murl)
                                link=main.unescapes(link)
                                vw = re.compile("low: '(.+?)'").findall(link)
                                if len(vw)==0:
                                        vw = re.compile("high: '(.+?)'").findall(link)
                                stream_url = vw[0]
                u2 = re.findall('upload2',murl)
                if u2:        
                         stream_url = Upload2(murl)
                sp = re.findall('sapo',murl)
                if sp:
                        stream_url=Sapo(murl)

                af = re.findall('.mp4',murl)
                if len(af)>0 and len(r)==0 and len(m)==0 and len(vb)==0 and len(u2)==0 and len(sp)==0: 
                                murl=murl.replace("'","").replace("+","%20")
                                print "hh q "+murl
                                stream_url=murl
            else:
                nv = re.findall('novamov',match[0])
                if nv:
                                stream_url = NovaWeed(match[0])
                v = re.findall('videoweed',match[0])
                if v:
                                stream_url = NovaWeed(match[0])

                m = re.findall('mp4upload',match[0])
                if m:
                                link=main.OPENURL(match[0])
                                link=main.unescapes(link)
                                vw = re.compile("'file': '(.+?)',").findall(link)
                                stream_url = vw[0]

                vb = re.findall('videobam',match[0])
                if vb:
                                link=main.OPENURL(match[0])
                                link=main.unescapes(link)
                                vw = re.compile("low: '(.+?)'").findall(link)
                                if len(vw)==0:
                                        vw = re.compile("high: '(.+?)'").findall(link)
                                stream_url = vw[0]
                u2 = re.findall('upload2',match[0])
                if u2:
                        stream_url = Upload2(match[0])
                sp = re.findall('sapo',match[0])
                if sp:
                        stream_url=Sapo(match[0])
                      
        else:
                r = re.findall('animefreak',match[0])
                if r:
                        link=main.OPENURL(match[0])
                        link=main.unescapes(link)
                        match = re.compile('src="http://www.animefreak.tv/sites/default/files/af/misc/player.swf.?file=(.+?)"').findall(link)
                        print 'HH2 '+match[0]
                        s = re.findall('http://.+?/(.+?).mp4.?(.+?)e=([^\&]+)',match[0])
                        for p1,p2,p3 in s:
                                p1=p1.replace('+','%20')
                                stream_url='http://78.152.42.214/'+p1+'.mp4?'+p2+'e='+p3
                        
                nv = re.findall('novamov',match[0])
                if nv:
                                stream_url = NovaWeed(match[0])
                v = re.findall('videoweed',match[0])
                if v:
                                stream_url = NovaWeed(match[0])

                m = re.findall('mp4upload',match[0])
                if m:
                                link=main.OPENURL(match[0])
                                link=main.unescapes(link)
                                vw = re.compile("'file': '(.+?)',").findall(link)
                                stream_url = vw[0]

                vb = re.findall('videobam',match[0])
                if vb:
                                link=main.OPENURL(match[0])
                                link=main.unescapes(link)
                                vw = re.compile("low: '(.+?)'").findall(link)
                                if len(vw)==0:
                                        vw = re.compile("high: '(.+?)'").findall(link)
                                stream_url = vw[0]
                u2 = re.findall('upload2',match[0])
                if u2:
                        stream_url = Upload2(match[0])
                        
                sp = re.findall('sapo',match[0])
                if sp:
                        stream_url=Sapo(match[0])
                        

        infoL={'Title': mname, 'Plot': desc, 'Genre': 'Anime'} 
        

        # 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
        main.GA("AnimeFreak","Watched")
        if selfAddon.getSetting("whistory") == "true":
            wh.add_item(mname+' '+'[COLOR green]AFTv[/COLOR]', sys.argv[0]+sys.argv[2], infolabels='', img=thumb, fanart='', is_folder=False)
        player.KeepAlive()
        return ok
            
Пример #29
0
def LINK2(mname, murl, thumb, desc):

    ok = True
    namelist = []
    urllist = []
    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'])
    }
    link2 = main.OPENURL(murl)
    SRT = os.path.join(datapath, 'Sub.srt')
    if os.path.exists(SRT):
        os.remove(SRT)
    link2 = link2.replace('\r',
                          '').replace('\n',
                                      '').replace('\t',
                                                  '').replace('&nbsp;', '')
    docUrl = re.compile('iframe src="(.+?)"').findall(link2)
    if len(docUrl) == 0:
        link3 = dekode(link2)
        try:
            docUrl = re.compile('iframe src="(.+?)"').findall(link3)
        except:
            youtube = re.compile(
                '<iframe width=".+?" height=".+?" src="http://www.youtube.com/embed/(.+?)" scrolling=".+?"'
            ).findall(link2)
            url = "plugin://plugin.video.youtube/?path=/root/video&action=play_video&videoid=" + youtube[
                0] + "&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]SominalFilms[/COLOR]',
                            sys.argv[0] + sys.argv[2],
                            infolabels='',
                            img=thumb,
                            fanart='',
                            is_folder=False)
            player.KeepAlive()
            return ok

    if docUrl:

        xbmc.executebuiltin(
            "XBMC.Notification(Please Wait!,Collecting Links,3000)")
        link2 = main.OPENURL(docUrl[0])
        link2 = link2.replace('\r',
                              '').replace('\n', '').replace('\t', '').replace(
                                  '&nbsp;', '').replace('\/',
                                                        '/').replace('\\', '')
        match = re.compile('url_encoded_fmt_stream_map\":\"(.+?),\"').findall(
            link2)
        if match:
            subtitle_url_start = re.compile("\"ttsurl\":\"(.+?)\"").findall(
                link2)
            v_add = re.compile("id=(.+?)&").findall(subtitle_url_start[0])
            subtitle_url_start = subtitle_url_start[0] + '&v=' + v_add[0]
            subtitle_url_start = subtitle_url_start + '&name=(www.SominalTvFilms.com)&lang=en&hl=e&format=1&type=track&kind'
            print "Subtitle File=" + str(subtitle_url_start)
            #Converts Xml file to SRT file
            try:
                link = main.OPENURL(subtitle_url_start)
                link = link.replace('\r', '').replace('\n', '').replace(
                    '\t', '').replace('&nbsp;',
                                      '').replace('<text start="0">', '')
            except:
                link = ''

            submatch = re.compile(
                '<text start="(.+?)" dur="(.+?)">(.+?)</text>').findall(link)
            if submatch:
                i = 1
                for start, dur, text in submatch:
                    #Converts seconds to HH:MM:SS,MS format for srt file
                    text = text.replace('&#39;', "'").replace(
                        '&quot;', '"').replace('&amp;', "&").replace(
                            "&#39;", "'").replace('&lt;i&gt;', '').replace(
                                "#8211;",
                                "-").replace('&lt;/i&gt;', '').replace(
                                    "&#8217;",
                                    "'").replace('&amp;quot;', '"').replace(
                                        '&#215;',
                                        '').replace('&#038;', '').replace(
                                            '&#8216;',
                                            '').replace('&#8211;', '').replace(
                                                '&#8220;', '').replace(
                                                    '&#8221;',
                                                    '').replace('&#8212;', '')
                    dur = Decimal(start) + Decimal(dur)
                    dur = str(dur)
                    if (float(start) % 1 != 0):
                        start1 = start.split('.')[0]
                        start2 = start.split('.')[1]
                    else:
                        start1 = start
                        start2 = 0
                    start = time.strftime('%H:%M:%S',
                                          time.gmtime(float(start1)))
                    if (float(dur) % 1 != 0):
                        dur1 = dur.split('.')[0]
                        dur2 = dur.split('.')[1]
                    else:
                        dur1 = dur
                        dur2 = 0
                    dur = time.strftime('%H:%M:%S', time.gmtime(float(dur1)))
                    #creating srt file and saving it on mashup profile folder
                    open(SRT, 'a').write("""
""" + str(i) + """
""" + str(start) + "," + str(start2) + " --> " + str(dur) + "," + str(dur2) +
                                         """
""" + text + """
""")
                    i = i + 1

            streams_map = str(match)
            stream = re.compile('url=(.+?)&type=.+?&quality=(.+?)[,\"]{1}'
                                ).findall(streams_map)
            for group1, group2 in stream:  #Thanks to the-one for google-doc resolver
                stream_url = str(group1)
                stream_url = main.unescapes(stream_url)
                urllist.append(stream_url)
                stream_qlty = str(group2.upper())
                if (stream_qlty == 'HD720'):
                    stream_qlty = 'HD-720p'
                elif (stream_qlty == 'LARGE'):
                    stream_qlty = 'SD-480p'
                elif (stream_qlty == 'MEDIUM'):
                    stream_qlty = 'SD-360p'
                namelist.append(stream_qlty)
            dialog = xbmcgui.Dialog()
            answer = dialog.select("Quality Select", namelist)
            if answer != -1:
                main.GA("SominalTv", "Watched")
                xbmc.executebuiltin(
                    "XBMC.Notification(Please Wait!,Opening Link,3000)")
                stream_url2 = urllist[int(answer)]
                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)
                player.setSubtitles(SRT)  #inserts Srt file from profile folder
                main.GA("SominalTv", "Watched")
                #WatchHistory
                if selfAddon.getSetting("whistory") == "true":
                    wh.add_item(mname + ' ' +
                                '[COLOR green]SominalFilms[/COLOR]',
                                sys.argv[0] + sys.argv[2],
                                infolabels='',
                                img=thumb,
                                fanart='',
                                is_folder=False)
                player.KeepAlive()

            return ok
    else:
        xbmc.executebuiltin("XBMC.Notification(Sorry!,Protected Link,5000)")
Пример #30
0
def ViceLink(mname, murl, thumb2):
    main.GA("Vice", "Watched")
    xbmc.executebuiltin("XBMC.Notification(Please Wait!,Playing Link,5000)")
    link = main.OPENURL(murl)
    ok = True
    desci = re.compile('<meta name="description" content="(.+?)" />').findall(
        link)
    if len(desci) > 0:
        desc = desci[0]
    else:
        desc = ''
    thumbi = re.compile(
        '<meta property="og:image" content="(.+?)" />').findall(link)
    if len(thumbi) > 0:
        thumb = thumbi[0]
    else:
        thumb = ''
    match = re.compile(
        'content="http://player.ooyala.com/player.swf.?embedCode=(.+?)&keepEmbedCode=true&autoplay=1"'
    ).findall(link)
    if len(match) > 0:

        playlist = xbmc.PlayList(xbmc.PLAYLIST_VIDEO)
        playlist.clear()
        durl = 'http://player.ooyala.com/player/ipad/' + match[0] + '.m3u8'
        link2 = main.OPENURL(durl)
        match = re.compile('http://(.+?).m3u8').findall(link2)
        if len(match) == 0:
            xbmc.executebuiltin(
                "XBMC.Notification(Sorry!,Link Cannot Be Played,5000)")
        else:
            if selfAddon.getSetting("vice-qua") == "0":
                try:
                    stream_url = 'http://' + match[3] + '.m3u8'
                except:
                    stream_url = 'http://' + match[0] + '.m3u8'
            elif selfAddon.getSetting("vice-qua") == "1":
                try:
                    stream_url = 'http://' + match[0] + '.m3u8'
                except:
                    stream_url = 'http://' + match[2] + '.m3u8'
            else:
                stream_url = durl

            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]Vice[/COLOR]',
                            sys.argv[0] + sys.argv[2],
                            infolabels='',
                            img=thumb,
                            fanart='',
                            is_folder=False)
            player.KeepAlive()
            return ok

    match2 = re.compile('content="http://www.youtube.com/v/(.+?)" />').findall(
        link)
    if len(match2) > 0:
        url = 'http://www.youtube.com/watch?v=' + match2[0]

        media = urlresolver.HostedMediaFile(str(url))
        source = media
        listitem = xbmcgui.ListItem(mname)
        if source:
            xbmc.executebuiltin(
                "XBMC.Notification(Please Wait!,Resolving Link,3000)")
            stream_url = source.resolve()
            if source.resolve() == False:
                xbmc.executebuiltin(
                    "XBMC.Notification(Sorry!,Link Cannot Be Resolved,5000)")
                return
        else:
            stream_url = False
        # 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]Vice[/COLOR]',
                        sys.argv[0] + sys.argv[2],
                        infolabels='',
                        img=thumb2,
                        fanart='',
                        is_folder=False)
        player.KeepAlive()
        return ok