1
0
Fork 0
mirror of https://github.com/jellyfin/jellyfin-web synced 2025-03-30 19:56:21 +00:00

display progress bars to show resume %

This commit is contained in:
Luke Pulverenti 2013-05-03 15:34:25 -04:00
parent 050b5909fc
commit b5c43bdbf7
30 changed files with 419 additions and 358 deletions

View file

@ -4,7 +4,7 @@
return {
getDetaultPageSize: function () {
getDefaultPageSize: function () {
if (window.location.toString().toLowerCase().indexOf('localhost') != -1) {
return 100;
@ -794,7 +794,8 @@
if (item.PlayedPercentage) {
tooltip = '';
tooltip = Math.round(item.PlayedPercentage) + '% played';
pct = item.PlayedPercentage;
}
else if (item.UserData && item.UserData.PlaybackPositionTicks && item.RunTimeTicks) {
@ -804,11 +805,10 @@
pct = (item.UserData.PlaybackPositionTicks / item.RunTimeTicks) * 100;
}
if (pct) {
if (pct && pct < 100) {
pct = parseInt(pct);
html += '<span title="' + tooltip + '" class="itemProgress">' + pct + '%</span>';
html += '<progress title="' + tooltip + '" class="itemProgressBar" min="0" max="100" value="' + pct + '">';
html += '</progress>';
}
var userData = item.UserData || {};