diff --git a/channels/discoveryplus.py b/channels/discoveryplus.py index dc4f0129..9f735cd9 100644 --- a/channels/discoveryplus.py +++ b/channels/discoveryplus.py @@ -186,9 +186,10 @@ def play(item): if item.contentType == 'episode': data = session.get('{}/playback/v2/videoPlaybackInfo/{}?usePreAuth=true'.format(api, item.id), headers=headers).json().get('data',{}).get('attributes',{}) else: data = session.get('{}/playback/v2/channelPlaybackInfo/{}?usePreAuth=true'.format(api, item.id), headers=headers).json().get('data',{}).get('attributes',{}) if data.get('protection', {}).get('drm_enabled',True): - url = data['streaming']['dash']['url'] + item.url = data['streaming']['dash']['url'] item.drm = 'com.widevine.alpha' item.license = data['protection']['schemes']['widevine']['licenseUrl'] + '|PreAuthorization=' + data['protection']['drmToken'] + '|R{SSM}|' else: - url = data['streaming']['hls']['url'] - return support.servertools.find_video_items(item, data=url) \ No newline at end of file + item.url = data['streaming']['hls']['url'] + item.manifest = 'hls' + return [item] \ No newline at end of file diff --git a/channels/paramount.py b/channels/paramount.py index f185b9de..40b0330f 100644 --- a/channels/paramount.py +++ b/channels/paramount.py @@ -157,12 +157,17 @@ def episodios(item): def findvideos(item): logger.debug() - return support.server(item, item.url, Download=False) + return support.server(item, itemlist=[item.clone(title='Paramount', server='directo', action='play')], Download=False) def play(item): logger.debug() - item.server = 'paramount_server' + item.manifest = 'hls' + mgid = support.match(item.url, patron=r'uri":"([^"]+)"').match + url = 'https://media.mtvnservices.com/pmt/e1/access/index.html?uri=' + mgid + '&configtype=edge&ref=' + item.url + ID, rootUrl = support.match(url, patron=[r'"id":"([^"]+)",',r'brightcove_mediagenRootURL":"([^"]+)"']).matches + item.url = jsontools.load(support.match(rootUrl.replace('&device={device}','').format(uri = ID)).data)['package']['video']['item'][0]['rendition'][0]['src'] + if item.livefilter: d = liveDict()[item.livefilter] item = item.clone(title=support.typo(item.livefilter, 'bold'), fulltitle=item.livefilter, url=d['url'], plot=d['plot'], action='play', forcethumb=True, no_return=True) diff --git a/servers/paramount_server.json b/servers/paramount_server.json index 33a323f6..f6a3b33a 100644 --- a/servers/paramount_server.json +++ b/servers/paramount_server.json @@ -1,5 +1,5 @@ { - "active": true, + "active": false, "find_videos": { "ignore_urls": [], "patterns": [