From 0938a4be8a32f28d096c17e3b37b4c71e2a8fb23 Mon Sep 17 00:00:00 2001 From: Alhaziel01 Date: Sun, 19 Apr 2020 18:00:51 +0200 Subject: [PATCH] Rimosso update library al download dalla videoteca --- platformcode/xbmc_videolibrary.py | 3 ++- specials/downloads.py | 6 +++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/platformcode/xbmc_videolibrary.py b/platformcode/xbmc_videolibrary.py index 64b4d7f0..25d5e529 100644 --- a/platformcode/xbmc_videolibrary.py +++ b/platformcode/xbmc_videolibrary.py @@ -1015,7 +1015,8 @@ def clean(path_list=[]): nun_records, records = execute_sql_kodi(sql) progress.update(100) - xbmc.sleep(5000 if inspect.stack()[1][3] == 'move_to_libray' else 1000) + # xbmc.sleep(5000 if inspect.stack()[1][3] == 'move_to_libray' else 1000) + xbmc.sleep(1000) progress.close() xbmc.executebuiltin('XBMC.ReloadSkin()') diff --git a/specials/downloads.py b/specials/downloads.py index 06181ed3..75766130 100644 --- a/specials/downloads.py +++ b/specials/downloads.py @@ -357,14 +357,14 @@ def move_to_libray(item): move_path = filetools.join(config.get_videolibrary_path(), FOLDER) download_path = filetools.join(DOWNLOAD_PATH, item.downloadFilename) - library_path = filetools.join(move_path, *filetools.split(item.downloadFilename)) + library_path = filetools.join(move_path, *filetools.split(item.downloadFilename)) final_path = download_path if item.contentType == "movie" and item.infoLabels["tmdb_id"]: contentTitle = item.contentTitle if item.contentTitle else item.fulltitle library_item = Item(title= filetools.split(item.downloadFilename)[-1], channel="downloads", contentTitle = contentTitle, fulltitle = item.fulltitle,action="findvideos", infoLabels=item.infoLabels, url=library_path) - videolibrarytools.save_movie(library_item) + videolibrarytools.save_movie(library_item, silent=True) elif item.contentType == "episode" and item.infoLabels["tmdb_id"]: contentSerieName = item.contentSerieName if item.contentSerieName else item.fulltitle @@ -372,7 +372,7 @@ def move_to_libray(item): fulltitle = item.fulltitle, action="findvideos", infoLabels=item.infoLabels, url=library_path) tvshow = Item(channel="downloads", contentType="tvshow", contentSerieName = contentSerieName, fulltitle = item.fulltitle, infoLabels={"tmdb_id": item.infoLabels["tmdb_id"]}) - videolibrarytools.save_tvshow(tvshow, [library_item]) + videolibrarytools.save_tvshow(tvshow, [library_item], silent=True) if not filetools.isdir(filetools.dirname(library_path)): filetools.mkdir(filetools.dirname(library_path))