From 59574159b035a8a67087cf117e598ab7174b3673 Mon Sep 17 00:00:00 2001 From: Alhaziel Date: Mon, 5 Aug 2019 20:31:56 +0200 Subject: [PATCH] Fix Downloader Attende prima di pulire la libreria --- specials/downloads.py | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/specials/downloads.py b/specials/downloads.py index 26e502f3..d440a801 100644 --- a/specials/downloads.py +++ b/specials/downloads.py @@ -307,15 +307,14 @@ def move_to_libray(item): filename = File.lower() name = name.lower() if File.startswith(name) and (File.endswith('.strm') or File.endswith('.json') or File.endswith('.nfo')): - clean = True logger.info('Elimino il File: ' + str(os.path.join(config.get_videolibrary_path(), FOLDER, path_title, File))) os.remove(os.path.join(config.get_videolibrary_path(), FOLDER, path_title, File)) from platformcode import xbmc_videolibrary + import xbmc xbmc_videolibrary.update(FOLDER) - if clean == True: - import xbmc - xbmc.sleep(3000) - xbmc_videolibrary.clean() + while xbmc.getCondVisibility('Library.IsScanningVideo()'): + xbmc.sleep(500) + xbmc_videolibrary.clean()