Rimosso update library al download dalla videoteca

This commit is contained in:
Alhaziel01
2020-04-19 18:00:51 +02:00
parent 93b45f27a8
commit 0938a4be8a
2 changed files with 5 additions and 4 deletions

View File

@@ -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()')

View File

@@ -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))