diff --git a/static/js/components/global-transcoding-tasks.js b/static/js/components/global-transcoding-tasks.js index 478a022..7458d48 100644 --- a/static/js/components/global-transcoding-tasks.js +++ b/static/js/components/global-transcoding-tasks.js @@ -10,7 +10,7 @@ let html = `
- + - 99%
@@ -52,9 +52,13 @@ function updateExistsView(data, view) { const taskContainer = $(view); + const href = `/single?path=${ data.task.file }`; const fileLink = taskContainer.find(".file a"); - fileLink.text(data.task.file.split("/").at(-1)); - fileLink.attr("href", `/single?path=${ data.task.file }`); + + if(fileLink.attr("href") != href) { + fileLink.text(data.task.file.split("/").at(-1)); + fileLink.attr("href", href); + } let time = getTimeFromTranscodingProgressMessage(data.message); const mInf = getMediaInfo(data.task.file); @@ -65,8 +69,11 @@ const progressPercent = calcTranscodingProgress(time, mInf.info.container.duration); - taskContainer.find(".file .progress-percent").text(`- ${ progressPercent }%`); - taskContainer.find(".file .circle-progress-bar")[0].dataset.value = progressPercent; + const cpbar = taskContainer.find(".file .circle-progress-bar")[0]; + if(cpbar.dataset.value != progressPercent) { + taskContainer.find(".file .progress-percent").text(`- ${ progressPercent }%`); + cpbar.dataset.value = progressPercent; + } } function globalTranscodingTasksInit() {