diff --git a/data/interfaces/default/css/plexpy.css b/data/interfaces/default/css/plexpy.css index 01b864fc..6ad3da79 100644 --- a/data/interfaces/default/css/plexpy.css +++ b/data/interfaces/default/css/plexpy.css @@ -683,6 +683,13 @@ a:hover .dashboard-activity-poster { -webkit-transition: all 0s; transition: all 0s; } +.dashboard-activity-progress .bufferbar { + padding-top: 6px; + background-color: #444; + position: absolute; + height: 6px; + overflow: hidden; +} .dashboard-activity-progress .bar { padding-top: 6px; background-color: #faa732; @@ -693,6 +700,9 @@ a:hover .dashboard-activity-poster { background-image: linear-gradient(to bottom, #fbb450, #f89406); background-repeat: repeat-x; filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fffbb450', endColorstr='#fff89406', GradientType=0); + position: absolute; + height: 6px; + overflow: hidden; } .dashboard-activity-metadata-wrapper { position: relative; diff --git a/data/interfaces/default/current_activity.html b/data/interfaces/default/current_activity.html index d437c6ca..f0ebcc66 100644 --- a/data/interfaces/default/current_activity.html +++ b/data/interfaces/default/current_activity.html @@ -117,7 +117,8 @@ DOCUMENTATION :: END Stream  Direct Play % else: Stream  Transcoding - % if a['throttled'] == 1: + (Speed: ${a['transcode_speed']}) + % if a['throttled'] == '1': (Throttled) % endif @@ -135,7 +136,8 @@ DOCUMENTATION :: END Stream  Direct Play % else: Stream  Transcoding - % if a['throttled']: + (Speed: ${a['transcode_speed']}) + % if a['throttled'] == '1': (Throttled) % endif @@ -171,6 +173,7 @@ DOCUMENTATION :: END % endif
+
${a['transcode_progress']}%
${a['progress_percent']}%
diff --git a/plexpy/pmsconnect.py b/plexpy/pmsconnect.py index 41256e2d..ab311a87 100644 --- a/plexpy/pmsconnect.py +++ b/plexpy/pmsconnect.py @@ -579,6 +579,8 @@ class PmsConnect(object): if session.getElementsByTagName('TranscodeSession'): transcode_session = session.getElementsByTagName('TranscodeSession')[0] throttled = helpers.get_xml_attr(transcode_session, 'throttled') + transcode_progress = helpers.get_xml_attr(transcode_session, 'progress') + transcode_speed = helpers.get_xml_attr(transcode_session, 'speed') audio_decision = helpers.get_xml_attr(transcode_session, 'audioDecision') transcode_audio_channels = helpers.get_xml_attr(transcode_session, 'audioChannels') transcode_audio_codec = helpers.get_xml_attr(transcode_session, 'audioCodec') @@ -586,6 +588,9 @@ class PmsConnect(object): transcode_protocol = helpers.get_xml_attr(transcode_session, 'protocol') duration = helpers.get_xml_attr(transcode_session, 'duration') else: + throttled = '0' + transcode_progress = '0' + transcode_speed = '' transcode_audio_channels = '' transcode_audio_codec = '' transcode_container = '' @@ -622,6 +627,8 @@ class PmsConnect(object): 'parent_rating_key': helpers.get_xml_attr(session, 'parentRatingKey'), 'grandparent_rating_key': helpers.get_xml_attr(session, 'grandparentRatingKey'), 'throttled': throttled, + 'transcode_progress': transcode_progress, + 'transcode_speed': str(round(helpers.cast_to_float(transcode_speed), 1)), 'audio_decision': audio_decision, 'audio_channels': audio_channels, 'audio_codec': audio_codec, @@ -667,6 +674,8 @@ class PmsConnect(object): if session.getElementsByTagName('TranscodeSession'): transcode_session = session.getElementsByTagName('TranscodeSession')[0] throttled = helpers.get_xml_attr(transcode_session, 'throttled') + transcode_progress = helpers.get_xml_attr(transcode_session, 'progress') + transcode_speed = helpers.get_xml_attr(transcode_session, 'speed') audio_decision = helpers.get_xml_attr(transcode_session, 'audioDecision') transcode_audio_channels = helpers.get_xml_attr(transcode_session, 'audioChannels') transcode_audio_codec = helpers.get_xml_attr(transcode_session, 'audioCodec') @@ -677,6 +686,9 @@ class PmsConnect(object): transcode_container = helpers.get_xml_attr(transcode_session, 'container') transcode_protocol = helpers.get_xml_attr(transcode_session, 'protocol') else: + throttled = '0' + transcode_progress = '0' + transcode_speed = '' transcode_audio_channels = '' transcode_audio_codec = '' transcode_video_codec = '' @@ -735,6 +747,8 @@ class PmsConnect(object): 'parent_rating_key': helpers.get_xml_attr(session, 'parentRatingKey'), 'grandparent_rating_key': helpers.get_xml_attr(session, 'grandparentRatingKey'), 'throttled': throttled, + 'transcode_progress': transcode_progress, + 'transcode_speed': str(round(helpers.cast_to_float(transcode_speed), 1)), 'audio_decision': audio_decision, 'audio_channels': audio_channels, 'audio_codec': audio_codec, @@ -789,6 +803,8 @@ class PmsConnect(object): 'parent_rating_key': helpers.get_xml_attr(session, 'parentRatingKey'), 'grandparent_rating_key': helpers.get_xml_attr(session, 'grandparentRatingKey'), 'throttled': throttled, + 'transcode_progress': transcode_progress, + 'transcode_speed': str(round(helpers.cast_to_float(transcode_speed), 1)), 'audio_decision': audio_decision, 'audio_channels': audio_channels, 'audio_codec': audio_codec, @@ -843,6 +859,8 @@ class PmsConnect(object): 'parent_rating_key': helpers.get_xml_attr(session, 'parentRatingKey'), 'grandparent_rating_key': helpers.get_xml_attr(session, 'grandparentRatingKey'), 'throttled': throttled, + 'transcode_progress': transcode_progress, + 'transcode_speed': str(round(helpers.cast_to_float(transcode_speed), 1)), 'audio_decision': audio_decision, 'audio_channels': audio_channels, 'audio_codec': audio_codec,