Migliorie Paramount e Discovery
This commit is contained in:
@@ -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',{})
|
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',{})
|
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):
|
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.drm = 'com.widevine.alpha'
|
||||||
item.license = data['protection']['schemes']['widevine']['licenseUrl'] + '|PreAuthorization=' + data['protection']['drmToken'] + '|R{SSM}|'
|
item.license = data['protection']['schemes']['widevine']['licenseUrl'] + '|PreAuthorization=' + data['protection']['drmToken'] + '|R{SSM}|'
|
||||||
else:
|
else:
|
||||||
url = data['streaming']['hls']['url']
|
item.url = data['streaming']['hls']['url']
|
||||||
return support.servertools.find_video_items(item, data=url)
|
item.manifest = 'hls'
|
||||||
|
return [item]
|
||||||
@@ -157,12 +157,17 @@ def episodios(item):
|
|||||||
|
|
||||||
def findvideos(item):
|
def findvideos(item):
|
||||||
logger.debug()
|
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):
|
def play(item):
|
||||||
logger.debug()
|
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:
|
if item.livefilter:
|
||||||
d = liveDict()[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)
|
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,5 +1,5 @@
|
|||||||
{
|
{
|
||||||
"active": true,
|
"active": false,
|
||||||
"find_videos": {
|
"find_videos": {
|
||||||
"ignore_urls": [],
|
"ignore_urls": [],
|
||||||
"patterns": [
|
"patterns": [
|
||||||
|
|||||||
Reference in New Issue
Block a user