Revert xbmc_videolibrary

This commit is contained in:
Alhaziel01
2020-04-04 18:19:33 +02:00
parent 2a9fb562be
commit 06f04e8f0b

View File

@@ -803,23 +803,23 @@ def update_db(current_path, new_path, current_movies_folder, new_movies_folder,
path = path.replace(old,new)
if sep == '/': path = path.replace('\\','/')
else: path = path.replace('/','\\')
if path.endswith(sep + sep): path = path[:-1]
# if path.endswith(sep + sep): path = path[:-1]
return path
logger.info()
# new = new_path
new = new_path
old = current_path
# rename main path for search in the DB
# if new.startswith("special://") or scrapertools.find_single_match(new, r'(^\w+:\/\/)'):
# new = new.replace('/profile/', '/%/').replace('/home/userdata/', '/%/')
# sep = '/'
# else:
# sep = os.sep
# if not new.endswith(sep):
# new += sep
rename main path for search in the DB
if new.startswith("special://") or scrapertools.find_single_match(new, r'(^\w+:\/\/)'):
new = new.replace('/profile/', '/%/').replace('/home/userdata/', '/%/')
sep = '/'
else:
sep = os.sep
if not new.endswith(sep):
new += sep
if old.startswith("special://") or scrapertools.find_single_match(old, r'(^\w+:\/\/)'):
old = old.replace('/profile/', '/%/').replace('/home/userdata/', '/%/')