From ed213a4b3432ccafcea397bfc3dd68fd4f5d197a Mon Sep 17 00:00:00 2001 From: croneter Date: Sun, 20 May 2018 14:23:21 +0200 Subject: [PATCH] Fix ValueError if plex.tv returns Plex Cloud URIs --- resources/lib/PlexFunctions.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/resources/lib/PlexFunctions.py b/resources/lib/PlexFunctions.py index a1424a06..0fab1c47 100644 --- a/resources/lib/PlexFunctions.py +++ b/resources/lib/PlexFunctions.py @@ -413,7 +413,13 @@ def _poke_pms(pms, queue): data['address'], data['port']) pms['connections'].insert(1, conn) - protocol, address, port = url.split(':', 2) + try: + protocol, address, port = url.split(':', 2) + except ValueError: + # e.g. .ork.plex.services uri, thanks Plex + protocol, address = url.split(':', 1) + port = data['port'] + url = '%s:%s' % (url, port) address = address.replace('/', '') xml = DU().downloadUrl('%s/identity' % url, authenticate=False,