From 2d739f64cf620244673795248f47e85ee38360b0 Mon Sep 17 00:00:00 2001 From: Tim Date: Sun, 6 Sep 2015 13:49:09 +0200 Subject: [PATCH] Fix some issues where some channel streams are being reported as episodes. Fix images for activity pane when channels/clips are being played. --- data/interfaces/default/current_activity.html | 13 +++++++++++-- plexpy/pmsconnect.py | 12 ++++++++++-- 2 files changed, 21 insertions(+), 4 deletions(-) diff --git a/data/interfaces/default/current_activity.html b/data/interfaces/default/current_activity.html index 1225d6fe..d166683d 100644 --- a/data/interfaces/default/current_activity.html +++ b/data/interfaces/default/current_activity.html @@ -80,8 +80,17 @@ DOCUMENTATION :: END
% elif a['type'] == 'clip': -
-
+ % if a['art'][:4] == 'http': +
+ % elif a['thumb'][:4] == 'http': +
+ % else: + % if a['art']: +
+ % else: +
+ % endif + % endif % else:
% endif diff --git a/plexpy/pmsconnect.py b/plexpy/pmsconnect.py index d766e56e..d25e783e 100644 --- a/plexpy/pmsconnect.py +++ b/plexpy/pmsconnect.py @@ -748,9 +748,13 @@ class PmsConnect(object): 'duration': duration, 'progress': progress, 'progress_percent': str(helpers.get_percent(progress, duration)), - 'type': helpers.get_xml_attr(session, 'type'), 'indexes': use_indexes } + if helpers.get_xml_attr(session, 'ratingKey').isdigit(): + session_output['type'] = helpers.get_xml_attr(session, 'type') + else: + session_output['type'] = 'clip' + elif helpers.get_xml_attr(session, 'type') == 'movie': session_output = {'session_key': helpers.get_xml_attr(session, 'sessionKey'), 'media_index': helpers.get_xml_attr(session, 'index'), @@ -797,9 +801,13 @@ class PmsConnect(object): 'duration': duration, 'progress': progress, 'progress_percent': str(helpers.get_percent(progress, duration)), - 'type': helpers.get_xml_attr(session, 'type'), 'indexes': use_indexes } + if helpers.get_xml_attr(session, 'ratingKey').isdigit(): + session_output['type'] = helpers.get_xml_attr(session, 'type') + else: + session_output['type'] = 'clip' + elif helpers.get_xml_attr(session, 'type') == 'clip': session_output = {'session_key': helpers.get_xml_attr(session, 'sessionKey'), 'media_index': helpers.get_xml_attr(session, 'index'),