From 5f1241adde8522c88ace7af70ddf7aa271f43144 Mon Sep 17 00:00:00 2001 From: croneter Date: Tue, 29 Jan 2019 13:52:23 +0100 Subject: [PATCH] Fix to correctly escape paths --- resources/lib/plex_api.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/resources/lib/plex_api.py b/resources/lib/plex_api.py index ce219fba..f6749481 100644 --- a/resources/lib/plex_api.py +++ b/resources/lib/plex_api.py @@ -1744,7 +1744,13 @@ class API(object): if path.startswith('\\\\'): path = 'smb:' + path.replace('\\', '/') if app.SYNC.escape_path: - path = quote(path) + try: + protocol, hostname, args = path.split(':', 2) + except ValueError: + pass + else: + args = quote(args) + path = '%s:%s:%s' % (protocol, hostname, args) if (app.SYNC.path_verified and not force_check) or omit_check: return path