T-014: Entschlüsselung nach Download — Key/IV aus Voucher (nie geloggt), ffmpeg -c copy → book.m4b + Cover + Kapitel ins Bücher-Verzeichnis, Temp-Cleanup, Status 'decrypting' im UI; Netz-End-zu-Ende-Test bestanden

This commit is contained in:
2026-11-06 20:01:23 +01:00
parent 255a0372ca
commit 7b812a7b72
4 changed files with 202 additions and 20 deletions

View File

@ -34,7 +34,7 @@
let n = 0
let bytes = 0
for (const it of Object.values(downloads)) {
if (it.status === 'running' || it.status === 'queued') {
if (it.status === 'running' || it.status === 'queued' || it.status === 'decrypting') {
n++
bytes += it.bytes
}
@ -77,11 +77,12 @@
return Boolean(b.local || loadedOverride[b.asin])
}
function activeDl(b: Book): 'running' | 'queued' | undefined {
function activeDl(b: Book): 'running' | 'queued' | 'decrypting' | undefined {
const d = downloads[b.asin]
if (!d) return undefined
if (d.status === 'running') return 'running'
if (d.status === 'queued') return 'queued'
if (d.status === 'decrypting') return 'decrypting'
return undefined
}
@ -310,7 +311,7 @@
{#if dlg}
<div class="overlay">
<span class="overlaytxt">
{dlg === 'running' ? (d && d.bytes > 0 ? mb(d.bytes) : 'lädt…') : 'in Warteschlange…'}
{dlg === 'running' ? (d && d.bytes > 0 ? mb(d.bytes) : 'lädt…') : dlg === 'decrypting' ? 'entschlüsselt…' : 'in Warteschlange…'}
</span>
</div>
{/if}
@ -319,7 +320,7 @@
<div class="t">{b.title}</div>
<div class="muted small">{b.authors}</div>
<div class="chips">
{#if isLocal(b)}<span class="chip ok" title="book.m4b liegt lokal vor">lokal</span>{:else if downloads[b.asin]?.status === 'done'}<span class="chip ok" title="Rohdaten geladen, Entschlüsselung folgt (T-014)">geladen</span>{/if}
{#if isLocal(b)}<span class="chip ok" title="book.m4b liegt lokal vor">lokal</span>{/if}
{#if b.is_finished}<span class="chip done">fertig</span>{/if}
{#if b.runtime_length_min > 0}<span class="chip">{fmtRuntime(b.runtime_length_min)}</span>{/if}
{#if d && d.status === 'failed'}<span class="chip err" title={d.msg}>Fehlgeschlagen</span>{/if}
@ -327,13 +328,13 @@
{#if b.percent_complete > 0 && !dlg}
<div class="progress"><div class="fill" style={`width:${b.percent_complete}%`}></div></div>
{/if}
{#if dlg === 'running'}
{#if dlg === 'running' || dlg === 'decrypting'}
<div class="progress indeterminate"><div class="fill"></div></div>
{:else if dlg === 'queued'}
<div class="progress indeterminate slow"><div class="fill"></div></div>
{/if}
<div class="actions">
{#if dlg === 'running' || dlg === 'queued'}
{#if dlg === 'running' || dlg === 'queued' || dlg === 'decrypting'}
<button class="ghost" onclick={() => abbrechen(b)}>
{dlg === 'queued' ? 'In der Queue — abbrechen?' : 'Abbrechen'}
</button>