MCPcopy Create free account
hub / github.com/Eltaurus-Lt/CourseDump2022 / updBatchProgress

Function updBatchProgress

progressbars.js:119–131  ·  view source on GitHub ↗
(batch_done = 0, batch_size = 1, cidd = "")

Source from the content-addressed store, hash-verified

117}
118
119function updBatchProgress(batch_done = 0, batch_size = 1, cidd = "") {
120 const done_str = `${batch_done}/${batch_size}`;
121 if (cidd) {
122 console.log(`cid: ${cidd['cid']} | scan complete (${done_str})`);
123 }
124
125 const batch_progress_bar = batchProgressBar(batch_size);
126 if (!batch_progress_bar) return;
127
128 batch_progress_bar.setAttribute("progress-label", "Batch progress");
129 batch_progress_bar.setAttribute("progress-ratio", done_str);
130 batch_progress_bar.style.backgroundPosition = (100 * (1. - batch_done/batch_size)).toFixed(2)+"%";
131}
132
133function updMediaProgress(media_done = 0, media_total = 1) {
134 const media_progress_bar = mediaProgressBar();

Callers 2

scanThreadFunction · 0.85
batchDownloadFunction · 0.85

Calls 1

batchProgressBarFunction · 0.85

Tested by

no test coverage detected