Fix ValueError if plex.tv returns Plex Cloud URIs

This commit is contained in:
croneter 2018-05-20 14:16:50 +02:00
parent 45e6baa34d
commit a7702573ad

View file

@ -415,7 +415,12 @@ def _poke_pms(pms, queue):
data['address'],
data['port'])
pms['connections'].insert(1, conn)
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']
address = address.replace('/', '')
xml = DU().downloadUrl('%s/identity' % url,
authenticate=False,