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/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') diff --git a/plexpy/plextv.py b/plexpy/plextv.py index 3b5e34ae..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'], @@ -109,7 +113,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.") 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 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"