Merge branch 'dev'

This commit is contained in:
JonnyWong16 2016-05-25 21:34:15 -07:00
commit ffa208e73f
5 changed files with 17 additions and 5 deletions

View file

@ -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.

View file

@ -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')

View file

@ -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.")

View file

@ -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

View file

@ -1,2 +1,2 @@
PLEXPY_VERSION = "master"
PLEXPY_RELEASE_VERSION = "1.4.4"
PLEXPY_RELEASE_VERSION = "1.4.5"