Exemplo n.º 1
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 = main.resolve_url(url)

            infoL={'Title': infoLabels['metaName'], '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]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
Exemplo n.º 2
0
def PLAYB(name, murl):
    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 = main.resolve_url(murl)

        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,
        )
        # WatchHistory
        if selfAddon.getSetting("whistory") == "true":
            from resources.universal import watchhistory

            wh = watchhistory.WatchHistory("plugin.video.movie25")
            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
Exemplo n.º 3
0
def preparevideolink(video_url, video_source):
    return main.resolve_url(video_url, video_source)
Exemplo n.º 4
0
def preparevideolink(video_url, video_source):
    return main.resolve_url(video_url, video_source)