mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
progress bars on resumable items
This commit is contained in:
parent
75ff5c8f43
commit
fd54e02387
6 changed files with 117 additions and 25 deletions
|
@ -534,6 +534,13 @@
|
|||
html += "</div>";
|
||||
}
|
||||
|
||||
if (options.showProgressBar) {
|
||||
|
||||
html += "<div class='posterItemText posterItemProgress'>";
|
||||
html += LibraryBrowser.getItemProgressBarHtml(item, true) || " ";
|
||||
html += "</div>";
|
||||
}
|
||||
|
||||
if (options.showNewIndicator !== false) {
|
||||
html += LibraryBrowser.getNewIndicatorHtml(item);
|
||||
}
|
||||
|
@ -785,7 +792,7 @@
|
|||
return html;
|
||||
},
|
||||
|
||||
getUserDataIconsHtml: function (item) {
|
||||
getItemProgressBarHtml: function (item, showProgressText) {
|
||||
|
||||
var html = '';
|
||||
|
||||
|
@ -795,7 +802,7 @@
|
|||
if (item.PlayedPercentage) {
|
||||
|
||||
tooltip = Math.round(item.PlayedPercentage) + '% played';
|
||||
|
||||
|
||||
pct = item.PlayedPercentage;
|
||||
}
|
||||
else if (item.UserData && item.UserData.PlaybackPositionTicks && item.RunTimeTicks) {
|
||||
|
@ -809,8 +816,21 @@
|
|||
|
||||
html += '<progress title="' + tooltip + '" class="itemProgressBar" min="0" max="100" value="' + pct + '">';
|
||||
html += '</progress>';
|
||||
|
||||
if (showProgressText) {
|
||||
html += '<span class="itemProgressText">' + tooltip + '</span>';
|
||||
}
|
||||
}
|
||||
|
||||
return html;
|
||||
},
|
||||
|
||||
getUserDataIconsHtml: function (item) {
|
||||
|
||||
var html = '';
|
||||
|
||||
html += LibraryBrowser.getItemProgressBarHtml(item);
|
||||
|
||||
var userData = item.UserData || {};
|
||||
|
||||
var itemId = item.Id;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue