miglioria hdpass_get_servers

This commit is contained in:
Alhaziel01
2020-05-19 17:45:27 +02:00
parent c3447cba4b
commit 2ec4e1dbe3
+16 -11
View File
@@ -25,7 +25,7 @@ except ImportError:
from urllib import urlencode from urllib import urlencode
from channelselector import thumb from channelselector import thumb
from core import httptools, scrapertools, servertools, tmdb, channeltools from core import httptools, scrapertools, servertools, tmdb, channeltools, filetools
from core.item import Item from core.item import Item
from lib import unshortenit from lib import unshortenit
from platformcode import logger, config from platformcode import logger, config
@@ -43,16 +43,21 @@ def hdpass_get_servers(item):
mir_url = scrapertools.decodeHtmlentities(mir_url) mir_url = scrapertools.decodeHtmlentities(mir_url)
log(mir_url) log(mir_url)
it = Item(channel=item.channel, it = Item(channel=item.channel,
action="play", action="play",
fulltitle=item.fulltitle, fulltitle=item.fulltitle,
quality=quality, quality=quality,
show=item.show, show=item.show,
thumbnail=item.thumbnail, thumbnail=item.thumbnail,
contentType=item.contentType, contentType=item.contentType,
title=srv, title=srv,
# server=srv, # server=srv,
url= mir_url) url= mir_url)
thL.append(executor.submit(hdpass_get_url, it))
if filetools.isfile(filetools.join(config.get_runtime_path(), 'servers', srv.lower() + '.json')):
it.server = srv.lower()
ret.append(it)
else:
thL.append(executor.submit(hdpass_get_url, it))
for res in futures.as_completed(thL): for res in futures.as_completed(thL):
if res.result(): if res.result():
ret.append(res.result()[0]) ret.append(res.result()[0])