diff --git a/resources/lib/PlexAPI.py b/resources/lib/PlexAPI.py index 1a1e2190..54017ea6 100644 --- a/resources/lib/PlexAPI.py +++ b/resources/lib/PlexAPI.py @@ -2515,16 +2515,16 @@ class API(): 'photo': 'photo' } typus = types[typus] - if window('remapSMB') == 'true': - path = path.replace(window('remapSMB%sOrg' % typus), - window('remapSMB%sNew' % typus), + if settings('remapSMB') == 'true': + path = path.replace(settings('remapSMB%sOrg' % typus), + settings('remapSMB%sNew' % typus), 1) # There might be backslashes left over: path = path.replace('\\', '/') - elif window('replaceSMB') == 'true': + elif settings('replaceSMB') == 'true': if path.startswith('\\\\'): path = 'smb:' + path.replace('\\', '/') - if window('plex_pathverified') == 'true' and forceCheck is False: + if settings('plex_pathverified') == 'true' and forceCheck is False: return path # exist() needs a / or \ at the end to work for directories @@ -2545,13 +2545,12 @@ class API(): if self.askToValidate(path): window('plex_shouldStop', value="true") path = None - window('plex_pathverified', value='true') + settings('plex_pathverified', value='true') settings('plex_pathverified', value='true') else: path = None elif forceCheck is False: - if window('plex_pathverified') != 'true': - window('plex_pathverified', value='true') + if settings('plex_pathverified') != 'true': settings('plex_pathverified', value='true') return path diff --git a/resources/lib/librarysync.py b/resources/lib/librarysync.py index 29597d9d..3be231bd 100644 --- a/resources/lib/librarysync.py +++ b/resources/lib/librarysync.py @@ -399,9 +399,6 @@ class LibrarySync(Thread): 'enableBackgroundSync') == "true" self.limitindex = int(settings('limitindex')) - if settings('plex_pathverified') == 'true': - window('plex_pathverified', value='true') - # Just in case a time sync goes wrong self.timeoffset = int(settings('kodiplextimeoffset')) window('kodiplextimeoffset', value=str(self.timeoffset)) diff --git a/resources/lib/userclient.py b/resources/lib/userclient.py index ed9be930..308dc06e 100644 --- a/resources/lib/userclient.py +++ b/resources/lib/userclient.py @@ -178,22 +178,6 @@ class UserClient(threading.Thread): window('useDirectPaths', value='true' if settings('useDirectPaths') == "1" else 'false') - window('replaceSMB', value='true' - if settings('replaceSMB') == "true" else 'false') - window('remapSMB', value='true' - if settings('remapSMB') == "true" else 'false') - if window('remapSMB') == 'true': - items = ('movie', 'tv', 'music') - for item in items: - # Normalize! Get rid of potential (back)slashes at the end - org = settings('remapSMB%sOrg' % item) - new = settings('remapSMB%sNew' % item) - if org.endswith('\\') or org.endswith('/'): - org = org[:-1] - if new.endswith('\\') or new.endswith('/'): - new = new[:-1] - window('remapSMB%sOrg' % item, value=org) - window('remapSMB%sNew' % item, value=new) # Start DownloadUtils session doUtils.startSession(reset=True) diff --git a/service.py b/service.py index 180dac3c..8183043f 100644 --- a/service.py +++ b/service.py @@ -97,9 +97,6 @@ class Service(): "plex_runLibScan", "plex_username", "pms_token", "plex_token", "pms_server", "plex_machineIdentifier", "plex_servername", "plex_authenticated", "PlexUserImage", "useDirectPaths", - "replaceSMB", "remapSMB", "remapSMBmovieOrg", "remapSMBtvOrg", - "remapSMBmusicOrg", "remapSMBmovieNew", "remapSMBtvNew", - "remapSMBmusicNew", "remapSMBphotoOrg", "remapSMBphotoNew", "suspend_LibraryThread", "plex_terminateNow", "kodiplextimeoffset", "countError", "countUnauthorized" ]