Beispiel #1
0
vod.skyticket = skyticket
nav.skyticket = skyticket
clips.skyticket = skyticket
liveTv.skyticket = skyticket
watchlist.skyticket = skyticket

# Router for all plugin actions
if 'action' in params:

    print params

    if params['action'] == 'playVod':
        if 'infolabels' in params:
            vod.playAsset(params['vod_id'],
                          infolabels=params['infolabels'],
                          parental_rating=int(params['parental_rating']))
        else:
            vod.playAsset(params['vod_id'],
                          parental_rating=int(params['parental_rating']))
    elif params['action'] == 'playClip':
        clips.playClip(params['id'])
    elif params['action'] == 'playLive':
        if 'infolabels' in params:
            liveTv.playLiveTv(params['manifest_url'],
                              package_code=params['package_code'],
                              infolabels=params['infolabels'],
                              parental_rating=int(params['parental_rating']))
        else:
            liveTv.playLiveTv(params['manifest_url'],
                              package_code=params['package_code'],
Beispiel #2
0
watchlist.skygo = skygo


def getDictFromString(str):
    return ast.literal_eval(str) if str else None


# Router for all plugin actions
if 'action' in params:

    xbmc.log('[Sky Go] params = %s' % params)

    if params['action'] == 'playVod':
        vod.playAsset(params['vod_id'],
                      infolabels=getDictFromString(
                          params.get('infolabels', None)),
                      art=getDictFromString(params.get('art', None)),
                      parental_rating=int(params.get('parental_rating', 0)))
    elif params['action'] == 'playClip':
        clips.playClip(params['id'])
    elif params['action'] == 'playLive':
        liveTv.playLiveTv(params['manifest_url'],
                          package_code=params.get('package_code'),
                          infolabels=getDictFromString(
                              params.get('infolabels', None)),
                          art=getDictFromString(params.get('art', None)),
                          parental_rating=int(params.get('parental_rating',
                                                         0)))
    elif params['action'] == 'listLiveTvChannelDirs':
        nav.listLiveTvChannelDirs()
    elif params['action'] == 'listLiveTvChannels':
Beispiel #3
0
    os.mkdir(datapath)
if os.path.isfile(dbPath):
    with open(dbPath) as f:
        try:
            db = pickle.load(f)
        except:
            print("Invalid File")
if db.updateDatabase():
    with open(dbPath, "wb") as f:
        pickle.dump(db, f)

nav = Navigation(db)
# Router for all plugin actions
if params:
    if params['action'] == 'playVod':
        vod.playAsset(params['vod_url'])
    if params['action'] == 'playLive':
        vod.playLive(params['vod_url'])
    elif params['action'] == 'listPage':
        nav.listSeasonsFromserial(params['id'])
    elif params['action'] == 'listSeason':
        nav.listEpisodesFromSeason(params['season_id'], params['id'])
    elif params['action'] == 'listDict':
        nav.listDict(params["id"], params['dict'])
    elif params['action'] == 'listDictCats':
        nav.listDictCategories(params["id"])
    elif params['action'] == 'listLive':
        nav.listLiveTV()
    elif params['action'] == 'login':
        nav.login()
    elif params['action'] == 'search':
Beispiel #4
0
from skygo import SkyGo

import navigation as nav
import watchlist

addon_handle = int(sys.argv[1])
plugin_base_url = sys.argv[0]
params = dict(urlparse.parse_qsl(sys.argv[2][1:]))

# Router for all plugin actions
if 'action' in params:

    print params

    if params['action'] == 'playVod':
        vod.playAsset(params['vod_id'])
    elif params['action'] == 'playClip':
        clips.playClip(params['id'])
    elif params['action'] == 'playLive':
        liveTv.playLiveTv(params['manifest_url'], params['package_code'])

    elif params['action'] == 'listLiveTvChannelDirs':
        nav.listLiveTvChannelDirs()
    elif params['action'] == 'listLiveTvChannels':
        channeldir_name = ''
        if 'channeldir_name' in params:
            channeldir_name = params['channeldir_name']
        nav.listLiveTvChannels(channeldir_name)

    elif params['action'] == 'watchlist':
        if 'list' in params: