Direct Paths: Fix AttributeError for widgets

- Fixes #588
This commit is contained in:
croneter 2019-01-01 16:53:50 +01:00
parent 2e4e1e0aea
commit bd192e4b6a

View file

@ -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