Quarantine
{#if totalReports > 0}
{totalReports}
{/if}
User-reported broken tracks waiting for triage.
{#if query.isPending}
Reading the queue…
{:else if query.isError}
Couldn't load the quarantine queue.
{:else if rows.length === 0}
Nothing to triage right now.
{:else}
{#each rows as r (r.track_id)}
{@const isExpanded = !!expanded[r.track_id]}
{@const primary: RowAction = {
icon: RotateCcw,
label: 'Resolve',
ariaLabel: `Resolve ${r.track_title}`,
onclick: () => onResolve(r)
}}
{@const secondary: RowAction[] = [
{
icon: Play,
label: 'Play',
ariaLabel: `Play ${r.track_title}`,
onclick: () => onPlay(r)
},
{
icon: Trash2,
label: 'Delete file',
ariaLabel: `Delete file for ${r.track_title}`,
onclick: () => openDeleteFile(r),
danger: true
},
// In the row's actions, so a phone reaches it from the menu too
// (#5604). A local-only track has no Lidarr album to remove, so
// it isn't offered.
...(r.lidarr_album_mbid
? [{
icon: Cloud,
label: 'Delete via Lidarr',
ariaLabel: `Delete via Lidarr for ${r.track_title}`,
onclick: () => openDeleteLidarr(r),
danger: true
}]
: [])
]}
{#if r.album_id}
{:else}
{/if}
{r.track_title}
{r.artist_name} · {r.album_title} · {r.report_count} {r.report_count === 1 ? 'report' : 'reports'} — latest {relativeTime(r.latest_at)}
{#each Object.entries(r.reason_counts) as [reason, count] (reason)}
{count}× {REASON_LABELS[reason as LidarrQuarantineReason] ?? reason}
{/each}
toggleExpanded(r.track_id)}
>
{isExpanded ? 'Hide reports' : `Show ${r.reports.length} ${r.reports.length === 1 ? 'report' : 'reports'}`}
{#if isExpanded}
{#each r.reports as rep, idx (rep.user_id + ':' + rep.created_at + ':' + idx)}
{rep.username}
· {REASON_LABELS[rep.reason] ?? rep.reason}
{#if rep.notes}
· {rep.notes}
{/if}
· {relativeTime(rep.created_at)}
{/each}
{/if}
{/each}
{/if}