mirror of
https://github.com/Tautulli/Tautulli.git
synced 2025-07-14 01:02:59 -07:00
duration for items in media info
This commit is contained in:
parent
0235ebe4d2
commit
672835e2ac
4 changed files with 21 additions and 2 deletions
|
@ -224,6 +224,22 @@ media_info_table_options = {
|
|||
},
|
||||
{
|
||||
"targets": [10],
|
||||
"data": "duration",
|
||||
"createdCell": function (td, cellData, rowData, row, col) {
|
||||
if (cellData !== null && cellData !== '') {
|
||||
$(td).html(humanDuration(cellData));
|
||||
} else {
|
||||
if (rowData['section_type'] != 'photo' && get_file_sizes != null) {
|
||||
get_file_sizes = true;
|
||||
}
|
||||
}
|
||||
},
|
||||
"width": "7%",
|
||||
"className": "no-wrap",
|
||||
"searchable": false
|
||||
},
|
||||
{
|
||||
"targets": [11],
|
||||
"data": "last_played",
|
||||
"createdCell": function (td, cellData, rowData, row, col) {
|
||||
if (cellData !== null && cellData !== '') {
|
||||
|
@ -236,7 +252,7 @@ media_info_table_options = {
|
|||
"searchable": false
|
||||
},
|
||||
{
|
||||
"targets": [11],
|
||||
"targets": [12],
|
||||
"data": "play_count",
|
||||
"createdCell": function (td, cellData, rowData, row, col) {
|
||||
if (cellData !== null && cellData !== '') {
|
||||
|
@ -457,6 +473,7 @@ function childTableFormatMedia(rowData) {
|
|||
'<th align="left" id="audio_codec">Audio Codec</th>' +
|
||||
'<th align="left" id="audio_channels">Audio Channels</th>' +
|
||||
'<th align="left" id="file_size">File Size</th>' +
|
||||
'<th align="left" id="duration">Duration</th>' +
|
||||
'<th align="left" id="last_played">Last Played</th>' +
|
||||
'<th align="left" id="total_plays">Total Plays</th>' +
|
||||
'</tr>' +
|
||||
|
|
|
@ -318,6 +318,7 @@ DOCUMENTATION :: END
|
|||
<th align="left" id="audio_codec">Audio Codec</th>
|
||||
<th align="left" id="audio_channels">Audio Channels</th>
|
||||
<th align="left" id="file_size">File Size</th>
|
||||
<th align="left" id="duration">Duration</th>
|
||||
<th align="left" id="last_played">Last Played</th>
|
||||
<th align="left" id="total_plays">Total Plays</th>
|
||||
</tr>
|
||||
|
|
|
@ -2806,7 +2806,7 @@ class PmsConnect(object):
|
|||
'parent_thumb': helpers.get_xml_attr(item, 'thumb'),
|
||||
'grandparent_thumb': helpers.get_xml_attr(item, 'grandparentThumb'),
|
||||
'added_at': helpers.get_xml_attr(item, 'addedAt'),
|
||||
'duration': helpers.get_xml_attr(item, 'duration') if section_type == 'movie' else 0
|
||||
'duration': helpers.get_xml_attr(item, 'duration') if section_type in ('movie', 'episode', 'track') else 0
|
||||
}
|
||||
|
||||
if get_media_info:
|
||||
|
|
|
@ -881,6 +881,7 @@ class WebInterface(object):
|
|||
("video_framerate", True, True),
|
||||
("audio_codec", True, True),
|
||||
("audio_channels", True, True),
|
||||
("duration", True, False),
|
||||
("file_size", True, False),
|
||||
("last_played", True, False),
|
||||
("play_count", True, False)]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue