mirror of
https://github.com/Tautulli/Tautulli.git
synced 2025-07-15 01:32:57 -07:00
Add items suffix to collections and playlist table
This commit is contained in:
parent
2c360b6472
commit
15e928ecf2
6 changed files with 43 additions and 11 deletions
|
@ -835,3 +835,16 @@ function user_page(user_id, user) {
|
|||
|
||||
return params;
|
||||
}
|
||||
|
||||
MEDIA_TYPE_HEADERS = {
|
||||
'movie': 'Movies',
|
||||
'show': 'TV Shows',
|
||||
'season': 'Seasons',
|
||||
'episode': 'Episodes',
|
||||
'artist': 'Artists',
|
||||
'album': 'Albums',
|
||||
'track': 'Tracks',
|
||||
'video': 'Videos',
|
||||
'audio': 'Tracks',
|
||||
'photo': 'Photos'
|
||||
}
|
|
@ -73,7 +73,11 @@ collections_table_options = {
|
|||
"data": "childCount",
|
||||
"createdCell": function (td, cellData, rowData, row, col) {
|
||||
if (cellData !== '') {
|
||||
$(td).html(cellData);
|
||||
var type = MEDIA_TYPE_HEADERS[rowData['subtype']] || '';
|
||||
if (rowData['childCount'] == 1) {
|
||||
type = type.slice(0, -1);
|
||||
}
|
||||
$(td).html(cellData + ' ' + type);
|
||||
}
|
||||
},
|
||||
"width": "10%",
|
||||
|
|
|
@ -39,7 +39,11 @@ playlists_table_options = {
|
|||
"data": "leafCount",
|
||||
"createdCell": function (td, cellData, rowData, row, col) {
|
||||
if (cellData !== '') {
|
||||
$(td).html(cellData);
|
||||
var type = MEDIA_TYPE_HEADERS[rowData['playlistType']] || '';
|
||||
if (rowData['leafCount'] == 1) {
|
||||
type = type.slice(0, -1);
|
||||
}
|
||||
$(td).html(cellData + ' ' + type);
|
||||
}
|
||||
},
|
||||
"width": "20%",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue