Show toast when download is skipped due to duplicate

Backend: set skipped:true on job when track already exists on disk.
Album downloads report "X geladen, Y bereits vorhanden" in the message.
Frontend: pollJob shows "⏭ bereits auf dem Server" instead of "✅ gespeichert"
when the job has skipped:true.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
HoneyandClaude Sonnet 4.6 committed 2026-04-26 14:06:45 +02:00
1 parent f08303753c
commit 499179fd40
2 files changed
+24 -9

No files matched your search

+4 -1
View File
@@ -312,7 +312,10 @@ async function pollJob(jobId) {
const d = await res.json();
updateJob(jobId, d.status, d.message, d.progress);
if(d.status!=='done' && d.status!=='error') setTimeout(() => pollJob(jobId), 1500);
else if(d.status==='done') toast(`✅ ${S.jobs[jobId]?.title||'Track'} gespeichert!`);
else if(d.status==='done') {
const title = S.jobs[jobId]?.title || 'Track';
toast(d.skipped ? `⏭ "${title}" bereits auf dem Server` : `✅ ${title} gespeichert!`);
}
} catch { updateJob(jobId, 'error', 'Status-Abfrage fehlgeschlagen'); }
}