Merge pull request #968 from ratoaq2/patch-2

Strip trailing and leading whitespaces from `mount_points`
This commit is contained in:
Clinton Hall 2016-02-23 21:56:15 +10:30
commit 6f000e36bc

View file

@ -366,6 +366,7 @@ def initialize(section=None):
if REMOTEPATHS: if REMOTEPATHS:
if isinstance(REMOTEPATHS, list): REMOTEPATHS = ','.join(REMOTEPATHS) # fix in case this imported as list. if isinstance(REMOTEPATHS, list): REMOTEPATHS = ','.join(REMOTEPATHS) # fix in case this imported as list.
REMOTEPATHS = [ tuple(item.split(',')) for item in REMOTEPATHS.split('|') ] # /volume1/Public/,E:\|/volume2/share/,\\NAS\ REMOTEPATHS = [ tuple(item.split(',')) for item in REMOTEPATHS.split('|') ] # /volume1/Public/,E:\|/volume2/share/,\\NAS\
REMOTEPATHS = [ (local.strip(), remote.strip()) for local, remote in REMOTEPATHS ] # strip trailing and leading whitespaces
PLEXSSL = int(CFG["Plex"]["plex_ssl"]) PLEXSSL = int(CFG["Plex"]["plex_ssl"])
PLEXHOST = CFG["Plex"]["plex_host"] PLEXHOST = CFG["Plex"]["plex_host"]