From df45c0af90dc70c3ce9401dc049cec1beb5f5394 Mon Sep 17 00:00:00 2001 From: Alhaziel01 Date: Wed, 25 Mar 2020 22:28:45 +0100 Subject: [PATCH] move_videolibrary, cambio path download in sources --- platformcode/config.py | 1 + specials/move_videolibrary.py | 3 +++ 2 files changed, 4 insertions(+) diff --git a/platformcode/config.py b/platformcode/config.py index e8ffa8b6..39e77cd9 100644 --- a/platformcode/config.py +++ b/platformcode/config.py @@ -221,6 +221,7 @@ def open_settings(): from specials import move_videolibrary + move_videolibrary.set_new_path(settings_pre.get('downloadpath'), settings_post.get('downloadpath')) # si se ha puesto que se quiere autoconfigurar y se habĂ­a creado el directorio de la videoteca if not settings_pre.get("videolibrary_kodi", None) and settings_post.get("videolibrary_kodi", None) \ diff --git a/specials/move_videolibrary.py b/specials/move_videolibrary.py index 94a517ce..c06ed257 100644 --- a/specials/move_videolibrary.py +++ b/specials/move_videolibrary.py @@ -153,6 +153,7 @@ def update_db(current_path, new_path, current_movies_folder, new_movies_folder, p += 5 progress.update(90, config.get_localized_string(20000), config.get_localized_string(80013)) + def clear_videolibrary_db(): log() progress = platformtools.dialog_progress_bg(config.get_localized_string(20000), config.get_localized_string(60601)) @@ -224,6 +225,8 @@ def clear_videolibrary_db(): def set_new_path(old, new=''): log() + if new == old: return + SOURCES_PATH = xbmc.translatePath("special://userdata/sources.xml") if filetools.isfile(SOURCES_PATH): xmldoc = minidom.parse(SOURCES_PATH)