mirror of
https://github.com/Tautulli/Tautulli.git
synced 2025-07-07 05:31:15 -07:00
Change friendly name hover title text to username
This commit is contained in:
parent
d9ece291b7
commit
e3eca5af46
10 changed files with 25 additions and 16 deletions
7
API.md
7
API.md
|
@ -1066,12 +1066,14 @@ Returns:
|
||||||
[{"friendly_name": "Jon Snow",
|
[{"friendly_name": "Jon Snow",
|
||||||
"total_plays": 170,
|
"total_plays": 170,
|
||||||
"user_id": 133788,
|
"user_id": 133788,
|
||||||
"user_thumb": "https://plex.tv/users/k10w42309cynaopq/avatar"
|
"user_thumb": "https://plex.tv/users/k10w42309cynaopq/avatar",
|
||||||
|
"username": "LordCommanderSnow"
|
||||||
},
|
},
|
||||||
{"platform_type": "DanyKhaleesi69",
|
{"platform_type": "DanyKhaleesi69",
|
||||||
"total_plays": 42,
|
"total_plays": 42,
|
||||||
"user_id": 8008135,
|
"user_id": 8008135,
|
||||||
"user_thumb": "https://plex.tv/users/568gwwoib5t98a3a/avatar"
|
"user_thumb": "https://plex.tv/users/568gwwoib5t98a3a/avatar",
|
||||||
|
"username: "DanyKhaleesi69"
|
||||||
},
|
},
|
||||||
{...},
|
{...},
|
||||||
{...}
|
{...}
|
||||||
|
@ -2545,6 +2547,7 @@ Returns:
|
||||||
"transcode_decision": "transcode",
|
"transcode_decision": "transcode",
|
||||||
"user_id": 133788,
|
"user_id": 133788,
|
||||||
"user_thumb": "https://plex.tv/users/568gwwoib5t98a3a/avatar",
|
"user_thumb": "https://plex.tv/users/568gwwoib5t98a3a/avatar",
|
||||||
|
"username": "LordCommanderSnow",
|
||||||
"year": 2016
|
"year": 2016
|
||||||
},
|
},
|
||||||
{...},
|
{...},
|
||||||
|
|
|
@ -1031,7 +1031,7 @@ a .users-poster-face:hover {
|
||||||
height: 249px;
|
height: 249px;
|
||||||
}
|
}
|
||||||
.dashboard-activity-container:hover .dashboard-activity-progress {
|
.dashboard-activity-container:hover .dashboard-activity-progress {
|
||||||
height: 14px;
|
height: 14px;
|
||||||
}
|
}
|
||||||
.dashboard-activity-container:hover .progress-bar {
|
.dashboard-activity-container:hover .progress-bar {
|
||||||
color: rgba(255, 255, 255, 1);
|
color: rgba(255, 255, 255, 1);
|
||||||
|
|
|
@ -397,7 +397,7 @@ DOCUMENTATION :: END
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="dashboard-activity-metadata-wrapper">
|
<div class="dashboard-activity-metadata-wrapper">
|
||||||
<a href="${user_href}" title="${data['friendly_name']}">
|
<a href="${user_href}" title="${data['username']}">
|
||||||
<div class="dashboard-activity-metadata-user-thumb" style="background-image: url(${data['user_thumb']});"></div>
|
<div class="dashboard-activity-metadata-user-thumb" style="background-image: url(${data['user_thumb']});"></div>
|
||||||
</a>
|
</a>
|
||||||
<div class="dashboard-activity-metadata-title-container">
|
<div class="dashboard-activity-metadata-title-container">
|
||||||
|
@ -521,7 +521,7 @@ DOCUMENTATION :: END
|
||||||
% endif
|
% endif
|
||||||
</div>
|
</div>
|
||||||
<div class="dashboard-activity-metadata-user">
|
<div class="dashboard-activity-metadata-user">
|
||||||
<a href="${user_href}" title="${data['friendly_name']}">${data['friendly_name']}</a>
|
<a href="${user_href}" title="${data['username']}">${data['friendly_name']}</a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -83,9 +83,9 @@ history_table_options = {
|
||||||
"createdCell": function (td, cellData, rowData, row, col) {
|
"createdCell": function (td, cellData, rowData, row, col) {
|
||||||
if (cellData !== '') {
|
if (cellData !== '') {
|
||||||
if (rowData['user_id']) {
|
if (rowData['user_id']) {
|
||||||
$(td).html('<a href="' + page('user', rowData['user_id']) + '">' + cellData + '</a>');
|
$(td).html('<a href="' + page('user', rowData['user_id']) + '" title="' + rowData['user'] + '">' + cellData + '</a>');
|
||||||
} else {
|
} else {
|
||||||
$(td).html('<a href="' + page('user', null, rowData['user']) + '">' + cellData + '</a>');
|
$(td).html('<a href="' + page('user', null, rowData['user']) + '" title="' + rowData['user'] + '">' + cellData + '</a>');
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
$(td).html(cellData);
|
$(td).html(cellData);
|
||||||
|
|
|
@ -51,9 +51,9 @@ sync_table_options = {
|
||||||
"createdCell": function (td, cellData, rowData, row, col) {
|
"createdCell": function (td, cellData, rowData, row, col) {
|
||||||
if (cellData !== '') {
|
if (cellData !== '') {
|
||||||
if (rowData['user_id']) {
|
if (rowData['user_id']) {
|
||||||
$(td).html('<a href="' + page('user', rowData['user_id']) + '">' + cellData + '</a>');
|
$(td).html('<a href="' + page('user', rowData['user_id']) + '" title="' + rowData['username'] + '">' + cellData + '</a>');
|
||||||
} else {
|
} else {
|
||||||
$(td).html('<a href="' + page('user', null, rowData['user']) + '">' + cellData + '</a>');
|
$(td).html('<a href="' + page('user', null, rowData['user']) + '" title="' + rowData['username'] + '">' + cellData + '</a>');
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
$(td).html(cellData);
|
$(td).html(cellData);
|
||||||
|
|
|
@ -78,7 +78,7 @@ users_list_table_options = {
|
||||||
"createdCell": function (td, cellData, rowData, row, col) {
|
"createdCell": function (td, cellData, rowData, row, col) {
|
||||||
if (cellData !== null && cellData !== '') {
|
if (cellData !== null && cellData !== '') {
|
||||||
$(td).html('<div class="edit-user-name" data-id="' + rowData['row_id'] + '">' +
|
$(td).html('<div class="edit-user-name" data-id="' + rowData['row_id'] + '">' +
|
||||||
'<a href="' + page('user', rowData['user_id']) + '">' + cellData + '</a>' +
|
'<a href="' + page('user', rowData['user_id']) + '" title="' + rowData['username'] + '">' + cellData + '</a>' +
|
||||||
'<input type="text" class="hidden" value="' + cellData + '">' +
|
'<input type="text" class="hidden" value="' + cellData + '">' +
|
||||||
'</div>');
|
'</div>');
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -25,11 +25,11 @@ DOCUMENTATION :: END
|
||||||
<div class="user-player-instance">
|
<div class="user-player-instance">
|
||||||
<li>
|
<li>
|
||||||
% if a['user_id']:
|
% if a['user_id']:
|
||||||
<a href="${page('user', a['user_id'])}" title="${a['friendly_name']}">
|
<a href="${page('user', a['user_id'])}" title="${a['username']}">
|
||||||
<div class="library-user-instance-box" style="background-image: url(${a['user_thumb']});"></div>
|
<div class="library-user-instance-box" style="background-image: url(${a['user_thumb']});"></div>
|
||||||
</a>
|
</a>
|
||||||
<div class=" user-player-instance-name">
|
<div class=" user-player-instance-name">
|
||||||
<a href="${page('user', a['user_id'])}" title="${a['friendly_name']}">${a['friendly_name']}</a>
|
<a href="${page('user', a['user_id'])}" title="${a['username']}">${a['friendly_name']}</a>
|
||||||
</div>
|
</div>
|
||||||
% else:
|
% else:
|
||||||
<div class="library-user-instance-box" style="background-image: url(${a['user_thumb']});"></div>
|
<div class="library-user-instance-box" style="background-image: url(${a['user_thumb']});"></div>
|
||||||
|
|
|
@ -791,7 +791,7 @@ class Libraries(object):
|
||||||
if str(section_id).isdigit():
|
if str(section_id).isdigit():
|
||||||
query = 'SELECT (CASE WHEN users.friendly_name IS NULL OR TRIM(users.friendly_name) = "" ' \
|
query = 'SELECT (CASE WHEN users.friendly_name IS NULL OR TRIM(users.friendly_name) = "" ' \
|
||||||
'THEN users.username ELSE users.friendly_name END) AS friendly_name, ' \
|
'THEN users.username ELSE users.friendly_name END) AS friendly_name, ' \
|
||||||
'users.user_id, users.thumb, users.custom_avatar_url AS custom_thumb, ' \
|
'users.user_id, users.username, users.thumb, users.custom_avatar_url AS custom_thumb, ' \
|
||||||
'COUNT(DISTINCT %s) AS user_count ' \
|
'COUNT(DISTINCT %s) AS user_count ' \
|
||||||
'FROM session_history ' \
|
'FROM session_history ' \
|
||||||
'JOIN session_history_metadata ON session_history_metadata.id = session_history.id ' \
|
'JOIN session_history_metadata ON session_history_metadata.id = session_history.id ' \
|
||||||
|
@ -817,6 +817,7 @@ class Libraries(object):
|
||||||
row = {'friendly_name': item['friendly_name'],
|
row = {'friendly_name': item['friendly_name'],
|
||||||
'user_id': item['user_id'],
|
'user_id': item['user_id'],
|
||||||
'user_thumb': user_thumb,
|
'user_thumb': user_thumb,
|
||||||
|
'username': item['username'],
|
||||||
'total_plays': item['user_count']
|
'total_plays': item['user_count']
|
||||||
}
|
}
|
||||||
user_stats.append(row)
|
user_stats.append(row)
|
||||||
|
|
|
@ -118,6 +118,7 @@ class Users(object):
|
||||||
|
|
||||||
columns = ['users.id AS row_id',
|
columns = ['users.id AS row_id',
|
||||||
'users.user_id',
|
'users.user_id',
|
||||||
|
'users.username',
|
||||||
'(CASE WHEN users.friendly_name IS NULL OR TRIM(users.friendly_name) = "" \
|
'(CASE WHEN users.friendly_name IS NULL OR TRIM(users.friendly_name) = "" \
|
||||||
THEN users.username ELSE users.friendly_name END) AS friendly_name',
|
THEN users.username ELSE users.friendly_name END) AS friendly_name',
|
||||||
'users.thumb AS user_thumb',
|
'users.thumb AS user_thumb',
|
||||||
|
@ -193,6 +194,7 @@ class Users(object):
|
||||||
|
|
||||||
row = {'row_id': item['row_id'],
|
row = {'row_id': item['row_id'],
|
||||||
'user_id': item['user_id'],
|
'user_id': item['user_id'],
|
||||||
|
'username': item['username'],
|
||||||
'friendly_name': item['friendly_name'],
|
'friendly_name': item['friendly_name'],
|
||||||
'user_thumb': user_thumb,
|
'user_thumb': user_thumb,
|
||||||
'plays': item['plays'],
|
'plays': item['plays'],
|
||||||
|
|
|
@ -982,12 +982,14 @@ class WebInterface(object):
|
||||||
[{"friendly_name": "Jon Snow",
|
[{"friendly_name": "Jon Snow",
|
||||||
"total_plays": 170,
|
"total_plays": 170,
|
||||||
"user_id": 133788,
|
"user_id": 133788,
|
||||||
"user_thumb": "https://plex.tv/users/k10w42309cynaopq/avatar"
|
"user_thumb": "https://plex.tv/users/k10w42309cynaopq/avatar",
|
||||||
|
"username": "LordCommanderSnow"
|
||||||
},
|
},
|
||||||
{"platform_type": "DanyKhaleesi69",
|
{"friendly_name": "DanyKhaleesi69",
|
||||||
"total_plays": 42,
|
"total_plays": 42,
|
||||||
"user_id": 8008135,
|
"user_id": 8008135,
|
||||||
"user_thumb": "https://plex.tv/users/568gwwoib5t98a3a/avatar"
|
"user_thumb": "https://plex.tv/users/568gwwoib5t98a3a/avatar",
|
||||||
|
"username: "DanyKhaleesi69"
|
||||||
},
|
},
|
||||||
{...},
|
{...},
|
||||||
{...}
|
{...}
|
||||||
|
@ -1200,6 +1202,7 @@ class WebInterface(object):
|
||||||
"transcode_decision": "transcode",
|
"transcode_decision": "transcode",
|
||||||
"user_id": 133788,
|
"user_id": 133788,
|
||||||
"user_thumb": "https://plex.tv/users/568gwwoib5t98a3a/avatar",
|
"user_thumb": "https://plex.tv/users/568gwwoib5t98a3a/avatar",
|
||||||
|
"username": "LordCommanderSnow",
|
||||||
"year": 2016
|
"year": 2016
|
||||||
},
|
},
|
||||||
{...},
|
{...},
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue