Merge pull request #978 from croneter/fix-sync-items

Force a full sync of all items after choosing a new PMS, changing a PMS' address and changing which Plex libraries to sync
This commit is contained in:
croneter 2019-09-08 15:25:30 +02:00 committed by GitHub
commit fbb65913db
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -198,7 +198,8 @@ class Service(object):
app.ACCOUNT.set_unauthenticated() app.ACCOUNT.set_unauthenticated()
self.server_has_been_online = False self.server_has_been_online = False
self.welcome_msg = False self.welcome_msg = False
# Force a full sync # Force a full sync of all items
library_sync.force_full_sync()
app.SYNC.run_lib_scan = 'full' app.SYNC.run_lib_scan = 'full'
# Enable the main loop to continue # Enable the main loop to continue
app.APP.suspend = False app.APP.suspend = False
@ -268,7 +269,8 @@ class Service(object):
app.ACCOUNT.set_unauthenticated() app.ACCOUNT.set_unauthenticated()
self.server_has_been_online = False self.server_has_been_online = False
self.welcome_msg = False self.welcome_msg = False
# Force a full sync # Force a full sync of all items
library_sync.force_full_sync()
app.SYNC.run_lib_scan = 'full' app.SYNC.run_lib_scan = 'full'
# Enable the main loop to continue # Enable the main loop to continue
app.APP.suspend = False app.APP.suspend = False
@ -295,7 +297,8 @@ class Service(object):
# Get newest sections from the PMS # Get newest sections from the PMS
if not sections.sync_from_pms(self, pick_libraries=True): if not sections.sync_from_pms(self, pick_libraries=True):
return return
# Force a full sync # Force a full sync of all items
library_sync.force_full_sync()
app.SYNC.run_lib_scan = 'full' app.SYNC.run_lib_scan = 'full'
finally: finally:
app.APP.resume_threads() app.APP.resume_threads()