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

View File

@@ -567,10 +567,12 @@ def title_format(item):
title = '[B][COLOR limegreen][%s][/COLOR][/B] %s' % (check, item.title.decode('utf-8'))
item.title = title.encode('utf-8')
if PY3: item.title = item.title.decode('utf-8')
except:
check = 'v'
title = '[B][COLOR limegreen][%s][/COLOR][/B] %s' % (check, item.title.decode('utf-8'))
item.title = title.encode('utf-8')
if PY3: item.title = item.title.decode('utf-8')
return item

View File

@@ -917,8 +917,13 @@ def add_sources(path):
nodo_video.appendChild(nodo_source)
# Guardamos los cambios
filetools.write(SOURCES_PATH,
'\n'.join([x for x in xmldoc.toprettyxml().encode("utf-8").splitlines() if x.strip()]))
if not PY3:
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):