Beispiel #1
0
def playLiveTv(manifest_url,
               package_code,
               infolabels=None,
               art=None,
               parental_rating=0):
    # hardcoded apixId for live content
    apix_id = 'livechannel_127'

    if (not xbmc.getCondVisibility('Window.IsMedia')):
        data = nav.getlistLiveChannelData()
        for tab in data:
            details = nav.getLiveChannelDetails(tab.get('eventList'),
                                                manifest_url)
            if details and len(details) == 1:
                for key in details.keys():
                    detail = details.get(key)
                    infolabels, detail['data'] = nav.getInfoLabel(
                        detail.get('type'), detail.get('data'))
                    art = nav.getArt(detail)
                    break

    skyticket.play(manifest_url,
                   package_code,
                   parental_rating=parental_rating,
                   info_tag=infolabels,
                   art_tag=art,
                   apix_id=apix_id)
Beispiel #2
0
def playAsset(asset_id):
    #get asset details and build infotag from it
    asset_info = skygo.getAssetDetails(asset_id)
    info_tag, asset_info = nav.getInfoLabel(asset_info.get('type', ''), asset_info)
    manifest_url = asset_info['media_url']
    if 'ms_media_url' in asset_info:
        manifest_url = asset_info['ms_media_url']

    skygo.play(manifest_url, package_code=asset_info['package_code'], info_tag=info_tag, apix_id=str(asset_info['event_id']))
Beispiel #3
0
def playAsset(asset_id, infolabels=None, art=None, parental_rating=0):
    # get asset details and build infotag from it
    asset_info = nav.getAssetDetailsFromCache(asset_id)
    manifest_url = asset_info['media_url']
    if 'ms_media_url' in asset_info:
        manifest_url = asset_info['ms_media_url']

    if infolabels is None:
        infolabels, asset_info = nav.getInfoLabel(asset_info.get('type', ''), asset_info)

    skygo.play(manifest_url, package_code=asset_info['package_code'], parental_rating=parental_rating, info_tag=infolabels, art_tag=art, apix_id=str(asset_info['event_id']))
Beispiel #4
0
def playAsset(asset_id):
    #get asset details and build infotag from it
    asset_info = skygo.getAssetDetails(asset_id)
    info_tag, asset_info = nav.getInfoLabel(asset_info.get('type', ''),
                                            asset_info)
    manifest_url = asset_info['media_url']
    if 'ms_media_url' in asset_info:
        manifest_url = asset_info['ms_media_url']

    skygo.play(manifest_url,
               package_code=asset_info['package_code'],
               info_tag=info_tag,
               apix_id=str(asset_info['event_id']))
Beispiel #5
0
def playAsset(asset_id, infolabels='', parental_rating=0):
    #get asset details and build infotag from it
    asset_info = nav.getAssetDetailsFromCache(asset_id)
    manifest_url = asset_info['media_url']
    if 'ms_media_url' in asset_info:
        manifest_url = asset_info['ms_media_url']

    info_tag = None
    if infolabels != '':
        info_tag = ast.literal_eval(infolabels)
    else:
        info_tag, asset_info = nav.getInfoLabel(asset_info.get('type', ''), asset_info)

    skyticket.play(manifest_url, package_code=asset_info['package_code'], parental_rating=parental_rating, info_tag=info_tag, apix_id=str(asset_info['event_id']))
Beispiel #6
0
def playLiveTv(channel_id):
    #hardcoded apixId for live content
    apix_id = 'livechannel_127'
    url = 'http://www.skygo.sky.de/epgd/sg/ipad/excerpt/'
    r = requests.get(url)
    data = r.json()
    for tab in data:
        for channel in tab['eventList']:
            if channel['channel']['id'] == channel_id:
                if 'msMediaUrl' in channel['channel']:
                    info_tag = nav.getInfoLabel('live', channel)
                    skygo.play(channel['channel']['msMediaUrl'], package_code=channel['channel']['mobilepc'], info_tag=info_tag, apix_id=apix_id)
                elif 'assetid' in channel['channel']['event']:
                    pass
                    #todo play asset from archive - actually not needed
                return
Beispiel #7
0
def playLiveTv(channel_id):
    #hardcoded apixId for live content
    apix_id = 'livechannel_127'
    url = 'http://www.skygo.sky.de/epgd/sg/ipad/excerpt/'
    r = requests.get(url)
    data = r.json()
    for tab in data:
        for channel in tab['eventList']:
            if channel['channel']['id'] == channel_id:
                if 'msMediaUrl' in channel['channel']:
                    info_tag = nav.getInfoLabel('live', channel)
                    skygo.play(channel['channel']['msMediaUrl'],
                               package_code=channel['channel']['mobilepc'],
                               info_tag=info_tag,
                               apix_id=apix_id)
                elif 'assetid' in channel['channel']['event']:
                    pass
                    #todo play asset from archive - actually not needed
                return