コード例 #1
0
def PlayVideo(id, bitrate, format, **params):
    response = video_service.get_url(media_id=id,
                                     format=format,
                                     bitrate=bitrate,
                                     other_server=common.other_server())

    url = response['url']

    if not url:
        common.no_contents()
    else:
        return IndirectResponse(MovieObject, key=HTTPLiveStreamURL(url))
コード例 #2
0
ファイル: live.py プロジェクト: shvets/etvnet-plex-plugin
def PlayHLS(channel_id, bitrate, format, offset, **params):
    response = video_service.get_url(None,
                                     channel_id=channel_id,
                                     bitrate=bitrate,
                                     format=format,
                                     live=True,
                                     offset=offset,
                                     other_server=common.other_server())

    Log(response['url'])

    if not response['url']:
        #common.no_contents()
        raise Ex.MediaNotAvailable
    else:
        return IndirectResponse(VideoClipObject,
                                key=HTTPLiveStreamURL(response['url']))
コード例 #3
0
ファイル: live.py プロジェクト: shvets/etvnet-plex-plugin
def PlayHLS(channel_id, bitrate, format, offset, **params):
    response = video_service.get_url(
        None,
        channel_id=channel_id,
        bitrate=bitrate,
        format=format,
        live=True,
        offset=offset,
        other_server=common.other_server(),
    )

    Log(response["url"])

    if not response["url"]:
        # common.no_contents()
        raise Ex.MediaNotAvailable
    else:
        return IndirectResponse(VideoClipObject, key=HTTPLiveStreamURL(response["url"]))
コード例 #4
0
ファイル: archive.py プロジェクト: shvets/etvnet-plex-plugin
def PlayVideo(id, bitrate, format, **params):
    response = video_service.get_url(media_id=id, format=format, bitrate=bitrate, other_server=common.other_server())

    url = response['url']

    if not url:
        common.no_contents()
    else:
        return IndirectResponse(MovieObject, key=HTTPLiveStreamURL(url))