diff --git a/data/interfaces/default/css/plexwatch.css b/data/interfaces/default/css/plexwatch.css index efca6249..417176c6 100644 --- a/data/interfaces/default/css/plexwatch.css +++ b/data/interfaces/default/css/plexwatch.css @@ -6695,6 +6695,31 @@ button.close { height:100%; opacity: 0.7; } +.dashboard-activity-poster-info-bar { + position:absolute; + color: #F9AA03; + bottom: 0; + background-color: rgba(0,0,0,.7); + width:100%; + height:22px; +} +.dashboard-activity-poster-info-text { + float: left; + text-align: left; + padding: 0px 0px 0px 2px; + font-size: 12px; + color: #999; + text-overflow: ellipsis; + overflow: hidden; + white-space: nowrap; +} +.dashboard-activity-poster-info-time { + float: right; + text-align: right; + padding: 0px 2px 0px 0px; + font-size: 12px; + color: #999; +} .dashboard-activity-metadata-user { text-overflow: ellipsis; overflow: hidden; diff --git a/data/interfaces/default/current_activity.html b/data/interfaces/default/current_activity.html index 8c901b0f..170d234a 100644 --- a/data/interfaces/default/current_activity.html +++ b/data/interfaces/default/current_activity.html @@ -17,6 +17,8 @@ data[sessions] :: Usable parameters == Global keys == session_key Returns a unique session id for the active stream rating_key Returns the unique identifier for the media item. +media_index Returns the index of the media item. +parent_media_index Returns the index of the media item's parent. type Returns the type of session. Either 'track', 'episode' or 'movie'. thumb Returns the location of the item's thumbnail. Use with pms_image_proxy. bif_thumb Returns the location of the item's bif thumbnail. Use with pms_image_proxy. @@ -75,6 +77,20 @@ DOCUMENTATION :: END
% endif +
+
+ % if a['type'] == 'track': + Track ${a['media_index']} + % elif a['type'] == 'episode': + Season ${a['parent_media_index']}, Episode ${a['media_index']} + % else: + ${a['title']} + % endif +
+
+ ${a['progress']}/${a['duration']} +
+
% endif
@@ -167,13 +183,30 @@ DOCUMENTATION :: END
+ % endfor % else:
Nothing is currently being watched.

diff --git a/data/interfaces/default/js/script.js b/data/interfaces/default/js/script.js index 879a6c71..5a30ded3 100644 --- a/data/interfaces/default/js/script.js +++ b/data/interfaces/default/js/script.js @@ -253,7 +253,6 @@ String.prototype.toProperCase = function () { function millisecondsToMinutes(ms, roundToMinute) { - console.log("Ms: " + ms) if (ms > 0) { seconds = ms / 1000; minutes = seconds / 60; @@ -270,7 +269,10 @@ function millisecondsToMinutes(ms, roundToMinute) { } return output; } else { - return '0'; + if (roundToMinute) { + return '0'; + } else { + return '0:00'; + } } } - diff --git a/plexpy/pmsconnect.py b/plexpy/pmsconnect.py index d63591e6..229cb6c7 100644 --- a/plexpy/pmsconnect.py +++ b/plexpy/pmsconnect.py @@ -530,6 +530,8 @@ class PmsConnect(object): machine_id = helpers.get_xml_attr(session.getElementsByTagName('Player')[0], 'machineIdentifier') session_output = {'session_key': helpers.get_xml_attr(session, 'sessionKey'), + 'media_index': helpers.get_xml_attr(session, 'index'), + 'parent_media_index': helpers.get_xml_attr(session, 'parentIndex'), 'art': helpers.get_xml_attr(session, 'art'), 'parent_thumb': helpers.get_xml_attr(session, 'parentThumb'), 'grandparent_thumb': helpers.get_xml_attr(session, 'grandparentThumb'), @@ -637,6 +639,8 @@ class PmsConnect(object): if helpers.get_xml_attr(session, 'type') == 'episode': session_output = {'session_key': helpers.get_xml_attr(session, 'sessionKey'), + 'media_index': helpers.get_xml_attr(session, 'index'), + 'parent_media_index': helpers.get_xml_attr(session, 'parentIndex'), 'art': helpers.get_xml_attr(session, 'art'), 'parent_thumb': helpers.get_xml_attr(session, 'parentThumb'), 'grandparent_thumb': helpers.get_xml_attr(session, 'grandparentThumb'), @@ -682,6 +686,8 @@ class PmsConnect(object): } 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'), + 'parent_media_index': helpers.get_xml_attr(session, 'parentIndex'), 'art': helpers.get_xml_attr(session, 'art'), 'thumb': helpers.get_xml_attr(session, 'thumb'), 'bif_thumb': bif_thumb, @@ -727,6 +733,8 @@ class PmsConnect(object): } 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'), + 'parent_media_index': helpers.get_xml_attr(session, 'parentIndex'), 'art': helpers.get_xml_attr(session, 'art'), 'thumb': helpers.get_xml_attr(session, 'thumb'), 'bif_thumb': bif_thumb,