From 27d356e3c5c429e173da98fc0d92b0aa12c4052b Mon Sep 17 00:00:00 2001 From: croneter Date: Sat, 19 Aug 2017 14:50:28 +0200 Subject: [PATCH] Don't quit sync threads if path wasn't found - Partially fixes #333 --- resources/lib/artwork.py | 5 +++-- resources/lib/library_sync/fanart.py | 5 +++-- resources/lib/librarysync.py | 3 +-- 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/resources/lib/artwork.py b/resources/lib/artwork.py index 1a310921..ce2edc34 100644 --- a/resources/lib/artwork.py +++ b/resources/lib/artwork.py @@ -126,8 +126,9 @@ def double_urldecode(text): return unquote(unquote(text)) -@thread_methods(add_stops=['STOP_SYNC'], - add_suspends=['SUSPEND_LIBRARY_THREAD', 'DB_SCAN']) +@thread_methods(add_suspends=['SUSPEND_LIBRARY_THREAD', + 'DB_SCAN', + 'STOP_SYNC']) class Image_Cache_Thread(Thread): xbmc_host = 'localhost' xbmc_port, xbmc_username, xbmc_password = setKodiWebServerDetails() diff --git a/resources/lib/library_sync/fanart.py b/resources/lib/library_sync/fanart.py index 1fdcb4e7..620f341d 100644 --- a/resources/lib/library_sync/fanart.py +++ b/resources/lib/library_sync/fanart.py @@ -17,8 +17,9 @@ log = getLogger("PLEX."+__name__) ############################################################################### -@thread_methods(add_suspends=['SUSPEND_LIBRARY_THREAD', 'DB_SCAN'], - add_stops=['STOP_SYNC']) +@thread_methods(add_suspends=['SUSPEND_LIBRARY_THREAD', + 'DB_SCAN', + 'STOP_SYNC']) class Process_Fanart_Thread(Thread): """ Threaded download of additional fanart in the background diff --git a/resources/lib/librarysync.py b/resources/lib/librarysync.py index 67301a11..62062b03 100644 --- a/resources/lib/librarysync.py +++ b/resources/lib/librarysync.py @@ -37,8 +37,7 @@ log = getLogger("PLEX."+__name__) ############################################################################### -@thread_methods(add_stops=['STOP_SYNC'], - add_suspends=['SUSPEND_LIBRARY_THREAD']) +@thread_methods(add_suspends=['SUSPEND_LIBRARY_THREAD', 'STOP_SYNC']) class LibrarySync(Thread): """ """