Make sure port is a string when when matching pms url

This commit is contained in:
JonnyWong16 2016-05-25 18:54:31 -07:00
commit 8eb5c475bb

View file

@ -109,7 +109,7 @@ def get_real_pms_url():
if connections:
# Get connection with matching address, otherwise return first connection
conn = next((c for c in connections if c['address'] == plexpy.CONFIG.PMS_IP
and c['port'] == plexpy.CONFIG.PMS_PORT), connections[0])
and c['port'] == str(plexpy.CONFIG.PMS_PORT)), connections[0])
plexpy.CONFIG.__setattr__('PMS_URL', conn['uri'])
plexpy.CONFIG.write()
logger.info(u"PlexPy PlexTV :: Server URL retrieved.")