Mejoras compatibilidad Kodi 19
This commit is contained in:
@@ -110,6 +110,8 @@ def limpia_nombre_excepto_1(s):
|
|||||||
stripped = ''.join(c for c in s if c in validchars)
|
stripped = ''.join(c for c in s if c in validchars)
|
||||||
# Convierte a iso
|
# Convierte a iso
|
||||||
s = stripped.encode("iso-8859-1")
|
s = stripped.encode("iso-8859-1")
|
||||||
|
if PY3:
|
||||||
|
s = s.decode('utf-8')
|
||||||
return s
|
return s
|
||||||
|
|
||||||
|
|
||||||
@@ -169,7 +171,10 @@ def downloadbest(video_urls, title, continuar=False):
|
|||||||
for elemento in invertida:
|
for elemento in invertida:
|
||||||
# videotitle = elemento[0]
|
# videotitle = elemento[0]
|
||||||
url = elemento[1]
|
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
|
# Calcula el fichero donde debe grabar
|
||||||
try:
|
try:
|
||||||
|
|||||||
@@ -567,10 +567,12 @@ def title_format(item):
|
|||||||
|
|
||||||
title = '[B][COLOR limegreen][%s][/COLOR][/B] %s' % (check, item.title.decode('utf-8'))
|
title = '[B][COLOR limegreen][%s][/COLOR][/B] %s' % (check, item.title.decode('utf-8'))
|
||||||
item.title = title.encode('utf-8')
|
item.title = title.encode('utf-8')
|
||||||
|
if PY3: item.title = item.title.decode('utf-8')
|
||||||
except:
|
except:
|
||||||
check = 'v'
|
check = 'v'
|
||||||
title = '[B][COLOR limegreen][%s][/COLOR][/B] %s' % (check, item.title.decode('utf-8'))
|
title = '[B][COLOR limegreen][%s][/COLOR][/B] %s' % (check, item.title.decode('utf-8'))
|
||||||
item.title = title.encode('utf-8')
|
item.title = title.encode('utf-8')
|
||||||
|
if PY3: item.title = item.title.decode('utf-8')
|
||||||
|
|
||||||
return item
|
return item
|
||||||
|
|
||||||
|
|||||||
@@ -917,8 +917,13 @@ def add_sources(path):
|
|||||||
nodo_video.appendChild(nodo_source)
|
nodo_video.appendChild(nodo_source)
|
||||||
|
|
||||||
# Guardamos los cambios
|
# Guardamos los cambios
|
||||||
filetools.write(SOURCES_PATH,
|
if not PY3:
|
||||||
'\n'.join([x for x in xmldoc.toprettyxml().encode("utf-8").splitlines() if x.strip()]))
|
filetools.write(SOURCES_PATH,
|
||||||
|
'\n'.join([x for x in xmldoc.toprettyxml().encode("utf-8").splitlines() if x.strip()]))
|
||||||
|
else:
|
||||||
|
filetools.write(SOURCES_PATH,
|
||||||
|
b'\n'.join([x for x in xmldoc.toprettyxml().encode("utf-8").splitlines() if x.strip()]),
|
||||||
|
vfs=False)
|
||||||
|
|
||||||
|
|
||||||
def ask_set_content(flag, silent=False):
|
def ask_set_content(flag, silent=False):
|
||||||
|
|||||||
Reference in New Issue
Block a user