alcuni fix per kodi 19
This commit is contained in:
+1
-1
@@ -113,7 +113,7 @@ class Downloader(object):
|
||||
line2 = config.get_localized_string(59983) % ( self.downloaded[1], self.downloaded[2], self.size[1], self.size[2], self.speed[1], self.speed[2], self.connections[0], self.connections[1])
|
||||
line3 = config.get_localized_string(60202) % (self.remaining_time)
|
||||
|
||||
progreso.update(int(self.progress), line1, line2 + " " + line3)
|
||||
progreso.update(int(self.progress), line1 + '\n' + line2 + " " + line3)
|
||||
self.__update_json()
|
||||
finally:
|
||||
progreso.close()
|
||||
|
||||
@@ -85,7 +85,7 @@ def decodeHtmlentities(data):
|
||||
|
||||
if match.group(1) == "#" and ent.replace(";", "").isdigit():
|
||||
ent = unichr(int(ent.replace(";", "")))
|
||||
return ent.encode('utf-8')
|
||||
return ent if PY3 else ent.encode('utf-8')
|
||||
else:
|
||||
cp = html5.get(ent)
|
||||
if cp:
|
||||
@@ -112,9 +112,11 @@ def unescape(text):
|
||||
# character reference
|
||||
try:
|
||||
if text[:3] == "&#x":
|
||||
return unichr(int(text[3:-1], 16)).encode("utf-8")
|
||||
ret = unichr(int(text[3:-1], 16))
|
||||
return ret if PY3 else ret.encode("utf-8")
|
||||
else:
|
||||
return unichr(int(text[2:-1])).encode("utf-8")
|
||||
ret = unichr(int(text[2:-1]))
|
||||
return ret if PY3 else ret.encode("utf-8")
|
||||
|
||||
except ValueError:
|
||||
logger.error("error de valor")
|
||||
|
||||
+3
-1
@@ -21,8 +21,10 @@ from core.item import Item
|
||||
from lib import unshortenit
|
||||
from platformcode import config
|
||||
from platformcode.logger import log
|
||||
from platformcode import logger
|
||||
from specials import autoplay
|
||||
|
||||
|
||||
def hdpass_get_servers(item):
|
||||
def get_hosts(url, quality):
|
||||
ret = []
|
||||
@@ -466,7 +468,7 @@ def scrape(func):
|
||||
|
||||
# if url may be changed and channel has findhost to update
|
||||
if 'findhost' in func.__globals__ and not itemlist:
|
||||
logger.info('running findhost ' + func.__module__)
|
||||
log('running findhost ' + func.__module__)
|
||||
host = func.__globals__['findhost']()
|
||||
parse = list(urlparse.urlparse(item.url))
|
||||
from core import jsontools
|
||||
|
||||
+2
-2
@@ -100,12 +100,12 @@ def find_and_set_infoLabels(item):
|
||||
otvdb_global = Tvdb(tvdb_id=item.infoLabels['tvdb_id'])
|
||||
|
||||
if not item.contentSeason:
|
||||
p_dialog.update(50, config.get_localized_string(60296), config.get_localized_string(60295))
|
||||
p_dialog.update(50, config.get_localized_string(60296) + '\n' + config.get_localized_string(60295))
|
||||
results, info_load = otvdb_global.get_list_results()
|
||||
logger.debug("results: %s" % results)
|
||||
|
||||
if not item.contentSeason:
|
||||
p_dialog.update(100, config.get_localized_string(60296), config.get_localized_string(60297) % len(results))
|
||||
p_dialog.update(100, config.get_localized_string(60296) + '\n' + config.get_localized_string(60297) % len(results))
|
||||
p_dialog.close()
|
||||
|
||||
if len(results) > 1:
|
||||
|
||||
@@ -205,7 +205,7 @@ def save_movie(item, silent=False):
|
||||
logger.error(traceback.format_exc())
|
||||
|
||||
if filetools.write(json_path, item.tojson()):
|
||||
if not silent: p_dialog.update(100, config.get_localized_string(60062), item.contentTitle)
|
||||
if not silent: p_dialog.update(100, config.get_localized_string(60062) + '\n' + item.contentTitle)
|
||||
item_nfo.library_urls[item.channel] = item.url
|
||||
|
||||
if filetools.write(nfo_path, head_nfo + item_nfo.tojson()):
|
||||
@@ -221,7 +221,7 @@ def save_movie(item, silent=False):
|
||||
# If we get to this point it is because something has gone wrong
|
||||
logger.error("Could not save %s in the video library" % item.contentTitle)
|
||||
if not silent:
|
||||
p_dialog.update(100, config.get_localized_string(60063), item.contentTitle)
|
||||
p_dialog.update(100, config.get_localized_string(60063) + '\n' + item.contentTitle)
|
||||
p_dialog.close()
|
||||
return 0, 0, -1, path
|
||||
|
||||
|
||||
Reference in New Issue
Block a user