From e4fb2de7c253385578c89c4874b0331cf1be1f99 Mon Sep 17 00:00:00 2001 From: angelblue05 Date: Sun, 27 Dec 2015 22:51:47 -0600 Subject: [PATCH] Prevent deleting artwork during initial sync --- resources/lib/artwork.py | 3 ++- resources/lib/librarysync.py | 1 + service.py | 3 ++- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/resources/lib/artwork.py b/resources/lib/artwork.py index 9ca2d63a..5952c204 100644 --- a/resources/lib/artwork.py +++ b/resources/lib/artwork.py @@ -332,7 +332,8 @@ class Artwork(): cacheimage = True # Only for the main backdrop, poster - if imageType in ("fanart", "poster"): + if (utils.window('emby_initialScan') != "true" and + imageType in ("fanart", "poster")): # Delete current entry before updating with the new one self.deleteCachedArtwork(url) diff --git a/resources/lib/librarysync.py b/resources/lib/librarysync.py index c78f7048..e5cacfab 100644 --- a/resources/lib/librarysync.py +++ b/resources/lib/librarysync.py @@ -216,6 +216,7 @@ class LibrarySync(threading.Thread): message = "Repair sync" else: message = "Initial sync" + utils.window('emby_initialScan', value="true") pDialog = self.progressDialog("%s" % message, forced=True) starttotal = datetime.now() diff --git a/service.py b/service.py index 4b3baa5e..2c97d50e 100644 --- a/service.py +++ b/service.py @@ -69,7 +69,8 @@ class Service(): "emby_online", "emby_serverStatus", "emby_onWake", "emby_syncRunning", "emby_dbCheck", "emby_kodiScan", - "emby_shouldStop", "emby_currUser", "emby_dbScan", "emby_sessionId" + "emby_shouldStop", "emby_currUser", "emby_dbScan", "emby_sessionId", + "emby_initialScan" ] for prop in properties: utils.window(prop, clear=True)