Fix Menu contestuale "scarica episodio"
This commit is contained in:
@@ -174,6 +174,7 @@ def episodios(item):
|
||||
plot=it['plot'],
|
||||
action='findvideos',
|
||||
contentType='episode',
|
||||
contentSerieName=item.fulltitle,
|
||||
url=host + '/watch/' + str(episodes['title_id']) + '?e=' + str(it['id'])))
|
||||
|
||||
support.videolibrary(itemlist, item)
|
||||
@@ -188,6 +189,6 @@ def findvideos(item):
|
||||
url = support.match(support.match(item).data.replace('"','"').replace('\\',''), patron=r'video_url"\s*:\s*"([^"]+)"').match
|
||||
for res in ['480p', '720p', '1080p']:
|
||||
newurl = '{}/{}'.format(url, res)
|
||||
if session.get(newurl, headers=headers).status_code == 200:
|
||||
if session.head(newurl, headers=headers).status_code == 200:
|
||||
itemlist += [item.clone(title=support.config.get_localized_string(30137), server='directo', url=newurl, quality=res, action='play')]
|
||||
return support.server(item, itemlist=itemlist)
|
||||
@@ -175,6 +175,9 @@ def findvideos(item):
|
||||
item.contentType = 'tvshow'
|
||||
item.data = data
|
||||
return episodios(item)
|
||||
else:
|
||||
item.contentTitle = item.fulltitle
|
||||
item.contentType = 'movie'
|
||||
|
||||
# if 'protectlink' in data:
|
||||
# urls = scrapertools.find_multiple_matches(data, r'<iframe src="[^=]+=(.*?)"')
|
||||
|
||||
@@ -602,7 +602,7 @@ def set_context_commands(item, item_url, parent_item, **kwargs):
|
||||
context_commands.append((config.get_localized_string(60355), "RunPlugin(%s?%s&%s)" % (sys.argv[0], item_url, 'channel=downloads&action=save_download&from_channel=' + item.channel + '&from_action=' + item.action)))
|
||||
context_commands.append((config.get_localized_string(60357), "RunPlugin(%s?%s&%s)" % (sys.argv[0], item_url, 'channel=downloads&action=save_download&download=season&from_channel=' + item.channel + '&from_action=' + item.action)))
|
||||
# Download episode
|
||||
elif item.contentType == "episode" or item.action in ['findvideos']:
|
||||
elif item.contentType == "episode" and item.action in ['findvideos']:
|
||||
context_commands.append((config.get_localized_string(60356), "RunPlugin(%s?%s&%s)" % (sys.argv[0], item_url, 'channel=downloads&action=save_download&from_channel=' + item.channel + '&from_action=' + item.action)))
|
||||
# Download season
|
||||
elif item.contentType == "season":
|
||||
|
||||
Reference in New Issue
Block a user