From bd192e4b6a10e3c7966747a065835873663e254f Mon Sep 17 00:00:00 2001 From: croneter Date: Tue, 1 Jan 2019 16:53:50 +0100 Subject: [PATCH] Direct Paths: Fix AttributeError for widgets - Fixes #588 --- resources/lib/app/libsync.py | 34 +++++++++++++--------------------- 1 file changed, 13 insertions(+), 21 deletions(-) diff --git a/resources/lib/app/libsync.py b/resources/lib/app/libsync.py index b2d0e2a9..0ceb68e3 100644 --- a/resources/lib/app/libsync.py +++ b/resources/lib/app/libsync.py @@ -19,22 +19,19 @@ def remove_trailing_slash(path): class Sync(object): def __init__(self, entrypoint=False): - if entrypoint: - self.load_entrypoint() - else: - self.load() - # Do we need to run a special library scan? - self.run_lib_scan = None - # Set if user decided to cancel sync - self.stop_sync = False - # Set during media playback if PKC should not do any syncs. Will NOT - # suspend synching of playstate progress - self.suspend_sync = False - # Could we access the paths? - self.path_verified = False - # Set if a Plex-Kodi DB sync is being done - along with - # window('plex_dbScan') set to 'true' - self.db_scan = False + self.load() + # Do we need to run a special library scan? + self.run_lib_scan = None + # Set if user decided to cancel sync + self.stop_sync = False + # Set during media playback if PKC should not do any syncs. Will NOT + # suspend synching of playstate progress + self.suspend_sync = False + # Could we access the paths? + self.path_verified = False + # Set if a Plex-Kodi DB sync is being done - along with + # window('plex_dbScan') set to 'true' + self.db_scan = False def load(self): # Direct Paths (True) or Addon Paths (False)? @@ -83,8 +80,3 @@ class Sync(object): # Shall Kodi show dialogs for syncing/caching images? (e.g. images left # to sync) self.image_sync_notifications = utils.settings('imageSyncNotifications') == 'true' - - def load_entrypoint(self): - self.direct_paths = utils.settings('useDirectPaths') == '1' - self.indicate_media_versions = utils.settings('indicate_media_versions') == "true" - self.path_verified = True