diff --git a/data/interfaces/default/js/tables/users.js b/data/interfaces/default/js/tables/users.js index 82caf116..67230361 100644 --- a/data/interfaces/default/js/tables/users.js +++ b/data/interfaces/default/js/tables/users.js @@ -90,6 +90,30 @@ users_list_table_options = { }, { "targets": [3], + "data": "username", + "createdCell": function (td, cellData, rowData, row, col) { + if (cellData !== null && cellData !== '') { + $(td).html(cellData); + } + }, + "visible": false, + "width": "10%", + "className": "no-wrap" + }, + { + "targets": [4], + "data": "email", + "createdCell": function (td, cellData, rowData, row, col) { + if (cellData !== null && cellData !== '') { + $(td).html(cellData); + } + }, + "visible": false, + "width": "10%", + "className": "no-wrap" + }, + { + "targets": [5], "data": "last_seen", "createdCell": function (td, cellData, rowData, row, col) { if (cellData !== null && cellData !== '') { @@ -103,7 +127,7 @@ users_list_table_options = { "className": "no-wrap" }, { - "targets": [4], + "targets": [6], "data": "ip_address", "createdCell": function (td, cellData, rowData, row, col) { if (cellData) { @@ -121,7 +145,7 @@ users_list_table_options = { "className": "no-wrap modal-control-ip" }, { - "targets": [5], + "targets": [7], "data": "platform", "createdCell": function (td, cellData, rowData, row, col) { if (cellData !== null && cellData !== '') { @@ -134,7 +158,7 @@ users_list_table_options = { "className": "no-wrap modal-control" }, { - "targets": [6], + "targets": [8], "data":"player", "createdCell": function (td, cellData, rowData, row, col) { if (cellData !== null && cellData !== '') { @@ -155,7 +179,7 @@ users_list_table_options = { "className": "no-wrap modal-control" }, { - "targets": [7], + "targets": [9], "data":"last_played", "createdCell": function (td, cellData, rowData, row, col) { if (cellData !== null && cellData !== '') { @@ -196,7 +220,7 @@ users_list_table_options = { "className": "datatable-wrap" }, { - "targets": [8], + "targets": [10], "data": "plays", "createdCell": function (td, cellData, rowData, row, col) { if (cellData !== null && cellData !== '') { @@ -208,7 +232,7 @@ users_list_table_options = { "className": "no-wrap" }, { - "targets": [9], + "targets": [11], "data": "duration", "createdCell": function (td, cellData, rowData, row, col) { if (cellData !== null && cellData !== '') { diff --git a/data/interfaces/default/users.html b/data/interfaces/default/users.html index 495a8056..37a0faa0 100644 --- a/data/interfaces/default/users.html +++ b/data/interfaces/default/users.html @@ -33,6 +33,8 @@ Edit User + Username + Email Last Streamed Last Known IP Last Platform diff --git a/plexpy/users.py b/plexpy/users.py index 571b565f..c79b62d5 100644 --- a/plexpy/users.py +++ b/plexpy/users.py @@ -127,6 +127,7 @@ class Users(object): 'users.username', '(CASE WHEN users.friendly_name IS NULL OR TRIM(users.friendly_name) = "" \ THEN users.username ELSE users.friendly_name END) AS friendly_name', + 'users.email', 'users.thumb AS user_thumb', 'users.custom_avatar_url AS custom_thumb', 'COUNT(DISTINCT %s) AS plays' % group_by, @@ -202,6 +203,7 @@ class Users(object): 'user_id': item['user_id'], 'username': item['username'], 'friendly_name': item['friendly_name'], + 'email': item['email'], 'user_thumb': user_thumb, 'plays': item['plays'], 'duration': item['duration'], diff --git a/plexpy/webserve.py b/plexpy/webserve.py index 63952807..a7358ec7 100644 --- a/plexpy/webserve.py +++ b/plexpy/webserve.py @@ -1305,6 +1305,8 @@ class WebInterface(object): # TODO: Find some one way to automatically get the columns dt_columns = [("user_thumb", False, False), ("friendly_name", True, True), + ("username", True, True), + ("email", True, True), ("last_seen", True, False), ("ip_address", True, True), ("platform", True, True),