mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
fix session update for progress bars
This commit is contained in:
parent
cc468aeac3
commit
62803bac5d
1 changed files with 4 additions and 4 deletions
|
@ -567,17 +567,17 @@ define(["datetime", "events", "itemHelper", "serverNotifications", "dom", "globa
|
||||||
var playbackProgressElem = row.querySelector(".playbackProgress");
|
var playbackProgressElem = row.querySelector(".playbackProgress");
|
||||||
if (nowPlayingItem && nowPlayingItem.RunTimeTicks) {
|
if (nowPlayingItem && nowPlayingItem.RunTimeTicks) {
|
||||||
var percent = 100 * (session.PlayState.PositionTicks || 0) / nowPlayingItem.RunTimeTicks;
|
var percent = 100 * (session.PlayState.PositionTicks || 0) / nowPlayingItem.RunTimeTicks;
|
||||||
html += indicators.getProgressHtml(percent, { containerClass: "playbackProgress" });
|
playbackProgressElem.innerHTML = indicators.getProgressHtml(percent, { containerClass: "playbackProgress" });
|
||||||
} else {
|
} else {
|
||||||
html += indicators.getProgressHtml(0, { containerClass: "playbackProgress hide" });
|
playbackProgressElem.innerHTML = indicators.getProgressHtml(0, { containerClass: "playbackProgress hide" });
|
||||||
}
|
}
|
||||||
|
|
||||||
var transcodingProgress = row.querySelector(".transcodingProgress");
|
var transcodingProgress = row.querySelector(".transcodingProgress");
|
||||||
if (session.TranscodingInfo && session.TranscodingInfo.CompletionPercentage) {
|
if (session.TranscodingInfo && session.TranscodingInfo.CompletionPercentage) {
|
||||||
var percent = session.TranscodingInfo.CompletionPercentage.toFixed(1);
|
var percent = session.TranscodingInfo.CompletionPercentage.toFixed(1);
|
||||||
html += indicators.getProgressHtml(percent, { containerClass: "transcodingProgress" });
|
transcodingProgress.innerHTML = indicators.getProgressHtml(percent, { containerClass: "transcodingProgress" });
|
||||||
} else {
|
} else {
|
||||||
html += indicators.getProgressHtml(0, { containerClass: "transcodingProgress hide" });
|
transcodingProgress.innerHTML = indicators.getProgressHtml(0, { containerClass: "transcodingProgress hide" });
|
||||||
}
|
}
|
||||||
|
|
||||||
var imgUrl = DashboardPage.getNowPlayingImageUrl(nowPlayingItem) || "";
|
var imgUrl = DashboardPage.getNowPlayingImageUrl(nowPlayingItem) || "";
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue