Skip to content

Commit

Permalink
Processed status now substracts failed updates.
Browse files Browse the repository at this point in the history
  • Loading branch information
Agrarvolution committed Feb 23, 2024
1 parent ff6eff1 commit 8e80c79
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/js/ltcCorrection.js
Original file line number Diff line number Diff line change
Expand Up @@ -308,9 +308,10 @@ function timecodeFromArray(timecodes) {
} else {
$('#source')[0].value = "";
try {
let status = JSON.parse(e);
const status = JSON.parse(e);
const processed = status?.processed + status?.results.filter((result) => result.isMatching).length;

logger.addLog(`${status?.processed || 0} ${status.processed === 1 ? "file has" : "files have"} been updated. Process finished. Select the next file to be processed.`, Logger.LOG_LEVELS.status);
logger.addLog(`${processed || 0} ${processed === 1 ? "file has" : "files have"} been updated. Process finished. Select the next file to be processed.`, Logger.LOG_LEVELS.status);

updateFileStatus(status?.results);
} catch (e) {
Expand Down

0 comments on commit 8e80c79

Please sign in to comment.