From 8eb5c475bb618cde44d2fc2427076d5e5ed4d955 Mon Sep 17 00:00:00 2001 From: JonnyWong16 Date: Wed, 25 May 2016 18:54:31 -0700 Subject: [PATCH] Make sure port is a string when when matching pms url --- plexpy/plextv.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plexpy/plextv.py b/plexpy/plextv.py index 3b5e34ae..c9486239 100644 --- a/plexpy/plextv.py +++ b/plexpy/plextv.py @@ -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.")