Clear the progress bar when a job finishes

This commit is contained in:
Justin Oros
2026-09-26 22:56:19 -07:00
parent 4c4e7eb8a8
commit 576979d4f9
2 changed files with 3 additions and 1 deletions
+2
View File
@@ -2029,6 +2029,7 @@ def run_loop():
if limit > 0 and published_today(s["profile_id"]) >= limit: if limit > 0 and published_today(s["profile_id"]) >= limit:
if status["stage"] != "daily limit reached": if status["stage"] != "daily limit reached":
logger.info("Profile '%s' reached its daily limit of %d, waiting for tomorrow", s["name"], limit) logger.info("Profile '%s' reached its daily limit of %d, waiting for tomorrow", s["name"], limit)
reset_progress()
set_stage("daily limit reached", log=False) set_stage("daily limit reached", log=False)
stop_event.wait(60) stop_event.wait(60)
continue continue
@@ -2045,6 +2046,7 @@ def run_loop():
set_stage(f"cooling down {mins} min after error") set_stage(f"cooling down {mins} min after error")
stop_event.wait(mins * 60) stop_event.wait(mins * 60)
continue continue
reset_progress()
gap = int(s["minutes_between_videos"]) gap = int(s["minutes_between_videos"])
if gap > 0 and not stop_event.is_set(): if gap > 0 and not stop_event.is_set():
set_stage(f"waiting {gap} min before next video") set_stage(f"waiting {gap} min before next video")
+1 -1
View File
@@ -456,7 +456,7 @@ const segs=$("#pg-segs");if(segs.childElementCount!==s.steps){segs.innerHTML="<i
[...segs.children].forEach((el,i)=>{el.className=i<s.step-1?"on":i===s.step-1?"now":""}); [...segs.children].forEach((el,i)=>{el.className=i<s.step-1?"on":i===s.step-1?"now":""});
const pct=Math.min(100,Math.round(s.step*100/s.steps)); const pct=Math.min(100,Math.round(s.step*100/s.steps));
$("#pg-meta").textContent=`Step ${s.step} of ${s.steps}, ${pct}% done`+(s.elapsed?`, running for ${fmtDur(s.elapsed)}`:""); $("#pg-meta").textContent=`Step ${s.step} of ${s.steps}, ${pct}% done`+(s.elapsed?`, running for ${fmtDur(s.elapsed)}`:"");
}else{pg.classList.remove("show");note.hidden=false;note.textContent=s.running?"Waiting for the next video to start.":"Press GO to start making videos for the active profile."} }else{pg.classList.remove("show");note.hidden=false;note.textContent=s.running?(s.stage&&s.stage!=="idle"?"":"Waiting for the next video to start."):"Press GO to start making videos for the active profile."}
lastChannel=s.channel||"";const lb=$("#link");if(lb){lb.textContent=s.channel?"Unlink YouTube channel":"Link YouTube channel"}const ls=$("#link-status");if(ls){ls.textContent=s.channel?"Linked to "+s.channel:"No channel linked yet"} lastChannel=s.channel||"";const lb=$("#link");if(lb){lb.textContent=s.channel?"Unlink YouTube channel":"Link YouTube channel"}const ls=$("#link-status");if(ls){ls.textContent=s.channel?"Linked to "+s.channel:"No channel linked yet"}
setButton(s.running); setButton(s.running);
const dur=h=>{if(!h.started_ts)return"";const end=h.finished_ts||(h.status==="running"?s.now:0);return end?fmtDur(end-h.started_ts):""}; const dur=h=>{if(!h.started_ts)return"";const end=h.finished_ts||(h.status==="running"?s.now:0);return end?fmtDur(end-h.started_ts):""};