mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
Use the same duration format
This commit is contained in:
parent
9778f2db65
commit
6165d5f69e
2 changed files with 19 additions and 10 deletions
|
@ -118,7 +118,7 @@ import '../../elements/emby-button/emby-button';
|
|||
}
|
||||
|
||||
if (item.RunTimeTicks) {
|
||||
miscInfo.push(datetime.getDisplayRunningTime(item.RunTimeTicks));
|
||||
miscInfo.push(datetime.getDisplayDuration(item.RunTimeTicks));
|
||||
}
|
||||
} else if (item.Type === 'PhotoAlbum' || item.Type === 'BoxSet') {
|
||||
count = item.ChildCount;
|
||||
|
@ -256,15 +256,7 @@ import '../../elements/emby-button/emby-button';
|
|||
if (item.Type === 'Audio') {
|
||||
miscInfo.push(datetime.getDisplayRunningTime(item.RunTimeTicks));
|
||||
} else {
|
||||
const totalMinutes = Math.round(item.RunTimeTicks / 600000000) || 1;
|
||||
const totalHours = Math.floor(totalMinutes / 60);
|
||||
const remainderMinutes = totalMinutes % 60;
|
||||
const result = [];
|
||||
if (totalHours > 0) {
|
||||
result.push(`${totalHours}h`);
|
||||
}
|
||||
result.push(`${remainderMinutes}m`);
|
||||
miscInfo.push(result.join(' '));
|
||||
miscInfo.push(datetime.getDisplayDuration(item.RunTimeTicks));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue