TaskType check

This commit is contained in:
glax 2023-06-11 17:05:24 +02:00
parent 36f7cbd3e9
commit b6f8c8aab5

View File

@ -366,12 +366,14 @@ function ShowTasksQueue(){
.then(json => { .then(json => {
tagTasksRunning.innerText = json.length; tagTasksRunning.innerText = json.length;
json.forEach(task => { json.forEach(task => {
downloadTasksOutput.appendChild(CreateProgressChild(task)); if(task.task == 2 || task.task == 4) {
document.querySelector(`#progress${task.taskId.replaceAll('=','')}`).value = task.progress; downloadTasksOutput.appendChild(CreateProgressChild(task));
var finishedHours = task.executionApproximatelyRemaining.split(':')[0]; document.querySelector(`#progress${task.taskId.replaceAll('=', '')}`).value = task.progress;
var finishedMinutes = task.executionApproximatelyRemaining.split(':')[1]; var finishedHours = task.executionApproximatelyRemaining.split(':')[0];
var finishedSeconds = task.executionApproximatelyRemaining.split(':')[2].split('.')[0]; var finishedMinutes = task.executionApproximatelyRemaining.split(':')[1];
document.querySelector(`#progressStr${task.taskId.replaceAll('=','')}`).innerText = `${finishedHours}:${finishedMinutes}:${finishedSeconds}`; var finishedSeconds = task.executionApproximatelyRemaining.split(':')[2].split('.')[0];
document.querySelector(`#progressStr${task.taskId.replaceAll('=', '')}`).innerText = `${finishedHours}:${finishedMinutes}:${finishedSeconds}`;
}
}); });
}); });
@ -487,11 +489,13 @@ setInterval(() => {
setInterval(() => { setInterval(() => {
GetRunningTasks().then((json) => { GetRunningTasks().then((json) => {
json.forEach(task => { json.forEach(task => {
document.querySelector(`#progress${task.taskId.replaceAll('=','')}`).value = task.progress; if(task.task == 2 || task.task == 4){
var finishedHours = task.executionApproximatelyRemaining.split(':')[0]; document.querySelector(`#progress${task.taskId.replaceAll('=','')}`).value = task.progress;
var finishedMinutes = task.executionApproximatelyRemaining.split(':')[1]; var finishedHours = task.executionApproximatelyRemaining.split(':')[0];
var finishedSeconds = task.executionApproximatelyRemaining.split(':')[2].split('.')[0]; var finishedMinutes = task.executionApproximatelyRemaining.split(':')[1];
document.querySelector(`#progressStr${task.taskId.replaceAll('=','')}`).innerText = `${finishedHours}:${finishedMinutes}:${finishedSeconds}`; var finishedSeconds = task.executionApproximatelyRemaining.split(':')[2].split('.')[0];
document.querySelector(`#progressStr${task.taskId.replaceAll('=','')}`).innerText = `${finishedHours}:${finishedMinutes}:${finishedSeconds}`;
}
}); });
}); });
},500); },500);