From 84090310f7fae846cac06fac2ffaae9335b53527 Mon Sep 17 00:00:00 2001 From: JonnyWong16 Date: Wed, 25 May 2016 18:53:40 -0700 Subject: [PATCH 1/5] Extract mapped IPv4 address from Plexivity import --- plexpy/plexivity_import.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plexpy/plexivity_import.py b/plexpy/plexivity_import.py index 879736e3..1b2af51c 100644 --- a/plexpy/plexivity_import.py +++ b/plexpy/plexivity_import.py @@ -108,7 +108,7 @@ def extract_plexivity_xml(xml=None): if a.getElementsByTagName('Player'): player_elem = a.getElementsByTagName('Player') for d in player_elem: - ip_address = helpers.get_xml_attr(d, 'address') + ip_address = helpers.get_xml_attr(d, 'address').split('::ffff:')[-1] machine_id = helpers.get_xml_attr(d, 'machineIdentifier') platform = helpers.get_xml_attr(d, 'platform') player = helpers.get_xml_attr(d, 'title') From 8eb5c475bb618cde44d2fc2427076d5e5ed4d955 Mon Sep 17 00:00:00 2001 From: JonnyWong16 Date: Wed, 25 May 2016 18:54:31 -0700 Subject: [PATCH 2/5] 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.") From 5fb16edf434febea107ea190ddf88b7ea9742609 Mon Sep 17 00:00:00 2001 From: JonnyWong16 Date: Wed, 25 May 2016 18:55:20 -0700 Subject: [PATCH 3/5] Make sure library details were returned when joining shared libraries --- plexpy/plextv.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/plexpy/plextv.py b/plexpy/plextv.py index c9486239..a9b2b784 100644 --- a/plexpy/plextv.py +++ b/plexpy/plextv.py @@ -44,7 +44,11 @@ def refresh_users(): if user_tokens and user_tokens['server_token']: pms_connect = pmsconnect.PmsConnect(token=user_tokens['server_token']) library_details = pms_connect.get_server_children() - shared_libraries = ';'.join(d['section_id'] for d in library_details['libraries_list']) + + if library_details: + shared_libraries = ';'.join(d['section_id'] for d in library_details['libraries_list']) + else: + shared_libraries = '' control_value_dict = {"user_id": item['user_id']} new_value_dict = {"username": item['username'], From 407e2ae481c2a4473e4f830250f6aa959e76895b Mon Sep 17 00:00:00 2001 From: JonnyWong16 Date: Wed, 25 May 2016 21:27:43 -0700 Subject: [PATCH 4/5] Revert pms image proxy to use 127.0.0.1 --- plexpy/pmsconnect.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plexpy/pmsconnect.py b/plexpy/pmsconnect.py index f14cb11f..c0678044 100644 --- a/plexpy/pmsconnect.py +++ b/plexpy/pmsconnect.py @@ -1904,7 +1904,7 @@ class PmsConnect(object): """ if img: - params = {'url': plexpy.CONFIG.PMS_URL + img} + params = {'url': 'http://127.0.0.1:32400%s' % img} if width.isdigit() and height.isdigit(): params['width'] = width params['height'] = height From 61ead15c388f80bd925e1840501fb52b3d452360 Mon Sep 17 00:00:00 2001 From: JonnyWong16 Date: Wed, 25 May 2016 21:33:50 -0700 Subject: [PATCH 5/5] v1.4.5 --- CHANGELOG.md | 8 ++++++++ plexpy/version.py | 2 +- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 042b4403..6d7df366 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,13 @@ # Changelog +## v1.4.5 (2016-05-25) + +* Fix: PlexPy unable to start if failed to get shared libraries for a user. +* Fix: Matching port number when retrieving the PMS url. +* Fix: Extract mapped IPv4 address in Plexivity import. +* Change: Revert back to internal url when retrieving PMS images. + + ## v1.4.4 (2016-05-24) * Fix: Image queries crashing the PMS when playing clips from channels. diff --git a/plexpy/version.py b/plexpy/version.py index 6edf2a78..068590a4 100644 --- a/plexpy/version.py +++ b/plexpy/version.py @@ -1,2 +1,2 @@ PLEXPY_VERSION = "master" -PLEXPY_RELEASE_VERSION = "1.4.4" +PLEXPY_RELEASE_VERSION = "1.4.5"