From cee656a0533e325f8d7d52b3a461f4b252d81d90 Mon Sep 17 00:00:00 2001 From: JonnyWong16 Date: Mon, 23 May 2016 18:02:13 -0700 Subject: [PATCH 1/5] Fix ip address in Plexivity import --- plexpy/plexivity_import.py | 1 + 1 file changed, 1 insertion(+) diff --git a/plexpy/plexivity_import.py b/plexpy/plexivity_import.py index e452619f..879736e3 100644 --- a/plexpy/plexivity_import.py +++ b/plexpy/plexivity_import.py @@ -100,6 +100,7 @@ def extract_plexivity_xml(xml=None): video_resolution = helpers.get_xml_attr(c, 'videoResolution') width = helpers.get_xml_attr(c, 'width') + ip_address = '' machine_id = '' platform = '' player = '' From 05ba89f164ed780659b7b02e9773cfc9a47746f0 Mon Sep 17 00:00:00 2001 From: JonnyWong16 Date: Tue, 24 May 2016 21:33:37 -0700 Subject: [PATCH 2/5] Make sure clip image urls are escaped --- data/interfaces/default/current_activity_instance.html | 8 ++++++-- plexpy/pmsconnect.py | 10 ++++++---- 2 files changed, 12 insertions(+), 6 deletions(-) diff --git a/data/interfaces/default/current_activity_instance.html b/data/interfaces/default/current_activity_instance.html index 9e69faff..9b1c8ea4 100644 --- a/data/interfaces/default/current_activity_instance.html +++ b/data/interfaces/default/current_activity_instance.html @@ -61,6 +61,8 @@ DOCUMENTATION :: END % if data is not None: <% + from urllib import quote + from plexpy import helpers data['indexes'] = helpers.cast_to_int(data['indexes']) %> @@ -90,9 +92,11 @@ DOCUMENTATION :: END
% else: % if data['art']: -
+ +
% else: -
+ +
% endif % endif % elif data['media_type'] == 'photo': diff --git a/plexpy/pmsconnect.py b/plexpy/pmsconnect.py index f94117a1..bf516c11 100644 --- a/plexpy/pmsconnect.py +++ b/plexpy/pmsconnect.py @@ -14,7 +14,7 @@ # along with PlexPy. If not, see . import threading -import urllib2 +import urllib from urlparse import urlparse import plexpy @@ -387,7 +387,7 @@ class PmsConnect(object): Output: array """ - uri = '/search?query=' + urllib2.quote(query.encode('utf8')) + track + uri = '/search?query=' + urllib.quote(query.encode('utf8')) + track request = self.request_handler.make_request(uri=uri, proto=self.protocol, request_type='GET', @@ -1902,10 +1902,12 @@ class PmsConnect(object): """ if img: - uri = '/photo/:/transcode?url=http://127.0.0.1:32400%s' % img + params = {'url': plexpy.CONFIG.PMS_URL + img} if width.isdigit() and height.isdigit(): - uri += '&width=%s&height=%s' % (width, height) + params['width'] = width + params['height'] = height + uri = '/photo/:/transcode?%s' % urllib.urlencode(params) result = self.request_handler.make_request(uri=uri, proto=self.protocol, request_type='GET', From 3623732cf7ce6422075e4fd170047b1d596dc543 Mon Sep 17 00:00:00 2001 From: JonnyWong16 Date: Tue, 24 May 2016 22:12:57 -0700 Subject: [PATCH 3/5] Sort sessions by session_key * Try to minimize instances jumping around under homepage current activity. * Still need to fix for music activity. Some clients have a different session_key per track. --- plexpy/pmsconnect.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/plexpy/pmsconnect.py b/plexpy/pmsconnect.py index bf516c11..f14cb11f 100644 --- a/plexpy/pmsconnect.py +++ b/plexpy/pmsconnect.py @@ -1021,6 +1021,8 @@ class PmsConnect(object): session_output = self.get_session_each(session_type, session_) session_list.append(session_output) + session_list = sorted(session_list, key=lambda k: k['session_key']) + output = {'stream_count': helpers.get_xml_attr(xml_head[0], 'size'), 'sessions': session.mask_session_info(session_list) } From bb152b590b7e9820da7bae74e88192561d53b408 Mon Sep 17 00:00:00 2001 From: JonnyWong16 Date: Tue, 24 May 2016 22:13:26 -0700 Subject: [PATCH 4/5] Set all datatable tooltips to body container --- data/interfaces/default/js/tables/history_table.js | 8 ++++---- .../default/js/tables/history_table_modal.js | 4 ++-- data/interfaces/default/js/tables/libraries.js | 8 ++++---- data/interfaces/default/js/tables/users.js | 11 ++++++----- 4 files changed, 16 insertions(+), 15 deletions(-) diff --git a/data/interfaces/default/js/tables/history_table.js b/data/interfaces/default/js/tables/history_table.js index a0ac766f..2ea85f02 100644 --- a/data/interfaces/default/js/tables/history_table.js +++ b/data/interfaces/default/js/tables/history_table.js @@ -448,10 +448,10 @@ function childTableOptions(rowData) { // Create the tooltips. $('.expand-history-tooltip').tooltip({ container: 'body' }); - $('.external-ip-tooltip').tooltip(); - $('.transcode-tooltip').tooltip(); - $('.media-type-tooltip').tooltip(); - $('.watched-tooltip').tooltip(); + $('.external-ip-tooltip').tooltip({ container: 'body' }); + $('.transcode-tooltip').tooltip({ container: 'body' }); + $('.media-type-tooltip').tooltip({ container: 'body' }); + $('.watched-tooltip').tooltip({ container: 'body' }); $('.thumb-tooltip').popover({ html: true, container: 'body', diff --git a/data/interfaces/default/js/tables/history_table_modal.js b/data/interfaces/default/js/tables/history_table_modal.js index d29b38aa..8ba5ba8f 100644 --- a/data/interfaces/default/js/tables/history_table_modal.js +++ b/data/interfaces/default/js/tables/history_table_modal.js @@ -132,8 +132,8 @@ history_table_modal_options = { $('#ajaxMsg').fadeOut(); // Create the tooltips. - $('.transcode-tooltip').tooltip(); - $('.media-type-tooltip').tooltip(); + $('.transcode-tooltip').tooltip({ container: 'body' }); + $('.media-type-tooltip').tooltip({ container: 'body' }); $('.thumb-tooltip').popover({ html: true, container: '#history-modal', diff --git a/data/interfaces/default/js/tables/libraries.js b/data/interfaces/default/js/tables/libraries.js index 4e0cf9d3..ad7a7435 100644 --- a/data/interfaces/default/js/tables/libraries.js +++ b/data/interfaces/default/js/tables/libraries.js @@ -217,10 +217,10 @@ libraries_list_table_options = { $('#ajaxMsg').fadeOut(); // Create the tooltips. - $('.purge-tooltip').tooltip(); - $('.edit-tooltip').tooltip(); - $('.transcode-tooltip').tooltip(); - $('.media-type-tooltip').tooltip(); + $('.purge-tooltip').tooltip({ container: 'body' }); + $('.edit-tooltip').tooltip({ container: 'body' }); + $('.transcode-tooltip').tooltip({ container: 'body' }); + $('.media-type-tooltip').tooltip({ container: 'body' }); $('.thumb-tooltip').popover({ html: true, container: 'body', diff --git a/data/interfaces/default/js/tables/users.js b/data/interfaces/default/js/tables/users.js index 898cbcfb..47d01484 100644 --- a/data/interfaces/default/js/tables/users.js +++ b/data/interfaces/default/js/tables/users.js @@ -220,13 +220,14 @@ users_list_table_options = { $('#ajaxMsg').fadeOut(); // Create the tooltips. - $('.purge-tooltip').tooltip(); - $('.edit-tooltip').tooltip(); - $('.transcode-tooltip').tooltip(); - $('.media-type-tooltip').tooltip(); - $('.watched-tooltip').tooltip(); + $('.purge-tooltip').tooltip({ container: 'body' }); + $('.edit-tooltip').tooltip({ container: 'body' }); + $('.transcode-tooltip').tooltip({ container: 'body' }); + $('.media-type-tooltip').tooltip({ container: 'body' }); + $('.watched-tooltip').tooltip({ container: 'body' }); $('.thumb-tooltip').popover({ html: true, + container: 'body', trigger: 'hover', placement: 'right', template: '', From bedcfa95204eae5fe465837c64aeecec37283174 Mon Sep 17 00:00:00 2001 From: JonnyWong16 Date: Tue, 24 May 2016 22:17:09 -0700 Subject: [PATCH 5/5] v1.4.4 --- CHANGELOG.md | 8 ++++++++ plexpy/version.py | 2 +- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 92d19a7e..042b4403 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,13 @@ # Changelog +## v1.4.4 (2016-05-24) + +* Fix: Image queries crashing the PMS when playing clips from channels. +* Fix: Plexivity import if IP address is missing. +* Fix: Tooltips shown behind the datatable headers. +* Fix: Current activity instances rendered in a random order causing them to jump around. + + ## v1.4.3 (2016-05-22) * Fix: PlexPy not starting without any authentication method. diff --git a/plexpy/version.py b/plexpy/version.py index e17a8551..6edf2a78 100644 --- a/plexpy/version.py +++ b/plexpy/version.py @@ -1,2 +1,2 @@ PLEXPY_VERSION = "master" -PLEXPY_RELEASE_VERSION = "1.4.3" +PLEXPY_RELEASE_VERSION = "1.4.4"