Add more exit points when synching

This commit is contained in:
croneter 2019-03-17 15:31:02 +01:00
parent 98975ff23d
commit 41483e6731

View file

@ -410,7 +410,7 @@ class FullSync(common.fullsync_mixin):
def _run(self): def _run(self):
self.current_sync = timing.plex_now() self.current_sync = timing.plex_now()
# Get latest Plex libraries and build playlist and video node files # Get latest Plex libraries and build playlist and video node files
if not sections.sync_from_pms(self): if self.isCanceled() or not sections.sync_from_pms(self):
return return
self.successful = True self.successful = True
try: try:
@ -422,10 +422,7 @@ class FullSync(common.fullsync_mixin):
# Actual syncing - do only new items first # Actual syncing - do only new items first
LOG.info('Running full_library_sync with repair=%s', LOG.info('Running full_library_sync with repair=%s',
self.repair) self.repair)
if not self.full_library_sync(): if self.isCanceled() or not self.full_library_sync():
self.successful = False
return
if self.isCanceled():
self.successful = False self.successful = False
return return
if common.PLAYLIST_SYNC_ENABLED and not playlists.full_sync(): if common.PLAYLIST_SYNC_ENABLED and not playlists.full_sync():