Mejoras compatibilidad Kodi 19

This commit is contained in:
Kingbox
2020-02-17 18:19:42 +01:00
committed by marco
parent 0ff1160d6f
commit 32f68499f0
3 changed files with 15 additions and 3 deletions
+6 -1
View File
@@ -110,6 +110,8 @@ def limpia_nombre_excepto_1(s):
stripped = ''.join(c for c in s if c in validchars)
# Convierte a iso
s = stripped.encode("iso-8859-1")
if PY3:
s = s.decode('utf-8')
return s
@@ -169,7 +171,10 @@ def downloadbest(video_urls, title, continuar=False):
for elemento in invertida:
# videotitle = elemento[0]
url = elemento[1]
logger.info("Downloading option " + title + " " + url.encode('ascii', 'ignore'))
if not PY3:
logger.info("Downloading option " + title + " " + url.encode('ascii', 'ignore'))
else:
logger.info("Downloading option " + title + " " + url.encode('ascii', 'ignore').decode('utf-8'))
# Calcula el fichero donde debe grabar
try: