Migliorie Paramount e Discovery

This commit is contained in:
Alhaziel01
2021-03-20 17:09:33 +01:00
parent f7d0afc041
commit 3c90065624
3 changed files with 12 additions and 6 deletions
+4 -3
View File
@@ -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)
item.url = data['streaming']['hls']['url']
item.manifest = 'hls'
return [item]
+7 -2
View File
@@ -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)
+1 -1
View File
@@ -1,5 +1,5 @@
{
"active": true,
"active": false,
"find_videos": {
"ignore_urls": [],
"patterns": [