Fix Download e Speedvideo
This commit is contained in:
@@ -622,7 +622,7 @@ def set_context_commands(item, parent_item):
|
||||
download='season').tourl())))
|
||||
|
||||
# Descargar episodio
|
||||
elif item.contentType == 'episode' and item.action in ["findvideos"]:
|
||||
elif item.contentType == 'episode' and item.action in ["findvideos", "play"]:
|
||||
item.contentType == "episode"
|
||||
context_commands.append((config.get_localized_string(60356), "XBMC.RunPlugin(%s?%s)" %
|
||||
(sys.argv[0], item.clone(channel="downloads", action="save_download",
|
||||
|
||||
@@ -17,8 +17,11 @@ def test_video_exists(page_url):
|
||||
def get_video_url(page_url, premium=False, user="", password="", video_password=""):
|
||||
logger.info("url=" + page_url)
|
||||
video_urls = []
|
||||
|
||||
quality ={'MOBILE':1,
|
||||
'NORMAL':2,
|
||||
'HD':3}
|
||||
data = httptools.downloadpage(page_url).data
|
||||
logger.info('SPEEDVIDEO DATA '+ data)
|
||||
|
||||
media_urls = scrapertools.find_multiple_matches(data, r"file:[^']'([^']+)',\s*label:[^\"]\"([^\"]+)\"")
|
||||
logger.info("speed video - media urls: %s " % media_urls)
|
||||
@@ -26,9 +29,10 @@ def get_video_url(page_url, premium=False, user="", password="", video_password=
|
||||
media_url = httptools.downloadpage(media_url, only_headers=True, follow_redirects=False).headers.get("location", "")
|
||||
|
||||
if media_url:
|
||||
video_urls.append([label + " " + media_url.rsplit('.', 1)[1] + ' [speedvideo]', media_url])
|
||||
video_urls.append([media_url.split('.')[-1] + ' - ' + label + ' - ' + ' [Speedvideo]', media_url])
|
||||
logger.info("speed video - media urls: %s " % video_urls)
|
||||
return video_urls
|
||||
|
||||
return sorted(video_urls, key=lambda x: quality[x[0].split(' - ')[1]])
|
||||
|
||||
|
||||
##,
|
||||
|
||||
@@ -463,11 +463,11 @@ def sort_method(item):
|
||||
|
||||
order_list_calidad = ["BLURAY", "FULLHD", "HD", "480P", "360P", "240P"]
|
||||
order_list_calidad = quality_orders[int(config.get_setting("quality", "downloads"))]
|
||||
match_list_calidad = {"BLURAY": ["BR", "BLURAY"],
|
||||
match_list_calidad = {"BLURAY": ["BR", "BLURAY", '4K'],
|
||||
"FULLHD": ["FULLHD", "FULL HD", "1080", "HD1080", "HD 1080", "1080p"],
|
||||
"HD": ["HD", "HD REAL", "HD 720", "720", "HDTV", "720p"],
|
||||
"480P": ["SD", "480P", '480'],
|
||||
"360P": ["360P", "360"],
|
||||
"480P": ["SD", "480P", '480', 'NORMAL'],
|
||||
"360P": ["360P", "360", 'MOBILE'],
|
||||
"240P": ["240P", "240"]}
|
||||
|
||||
value = (get_match_list(item.title, match_list_idimas, order_list_idiomas, ignorecase=True, only_ascii=True).index, \
|
||||
@@ -626,8 +626,9 @@ def download_from_best_server(item):
|
||||
|
||||
progreso.update(100, config.get_localized_string(70183), config.get_localized_string(70181) % len(play_items),
|
||||
config.get_localized_string(70182))
|
||||
|
||||
play_items.sort(key=sort_method)
|
||||
|
||||
if config.get_setting("server_reorder", "downloads") == 1:
|
||||
play_items.sort(key=sort_method)
|
||||
|
||||
if progreso.iscanceled():
|
||||
return {"downloadStatus": STATUS_CODES.canceled}
|
||||
|
||||
Reference in New Issue
Block a user