% if data['transcode_decision'] == 'transcode':
Transcode
diff --git a/data/interfaces/default/index.html b/data/interfaces/default/index.html
index 004bed3f..4cd1262a 100644
--- a/data/interfaces/default/index.html
+++ b/data/interfaces/default/index.html
@@ -181,6 +181,22 @@
+
%def>
@@ -469,6 +485,27 @@
});
});
+ $('#currentActivity').on('click', '.raw-stream-info-modal', function () {
+ $.ajax({
+ url: 'get_activity',
+ type: 'GET',
+ cache: false,
+ async: true,
+ data: {
+ session_key: $(this).data('key')
+ },
+ error: function (xhr, status, error) {
+ console.log(status + ': ' + error);
+ },
+ complete: function (xhr, status) {
+ var session = $.parseJSON(xhr.responseText);
+ $('#raw-stream-info-title').text(session.full_title);
+ $('#raw-stream-info-user').text(session.friendly_name);
+ $('#raw-stream-info').text(JSON.stringify(session, null, '\t'));
+ }
+ });
+ });
+
% if _session['user_group'] == 'admin':
// Terminate session
$('#currentActivity').on('click', '.dashboard-activity-terminate-session', function (e) {
diff --git a/plexpy/webserve.py b/plexpy/webserve.py
index 740a7412..0a04e5d6 100644
--- a/plexpy/webserve.py
+++ b/plexpy/webserve.py
@@ -4332,7 +4332,7 @@ class WebInterface(object):
@cherrypy.tools.json_out()
@requireAuth()
@addtoapi()
- def get_activity(self, **kwargs):
+ def get_activity(self, session_key=None, **kwargs):
""" Get the current activity on the PMS.
```
@@ -4345,7 +4345,7 @@ class WebInterface(object):
Returns:
json:
{"stream_count": 3,
- "session":
+ "sessions":
[{"art": "/library/metadata/1219/art/1462175063",
"aspect_ratio": "1.78",
"audio_channels": "6",
@@ -4419,6 +4419,9 @@ class WebInterface(object):
ip_address = data_factory.get_session_ip(session['session_key'])
session['ip_address'] = ip_address
+ if session_key:
+ return next((s for s in result['sessions'] if s['session_key'] == session_key), {})
+
return result
else:
logger.warn(u"Unable to retrieve data for get_activity.")