{#if resolver.active}

● {resolver.label} — finding the best source…

{:else if resolver.error}

{resolver.error}

{/if} {#if catalog.albumLoading}

Loading album…

{:else if !page}

{catalog.error || "Album not found."}

{:else}
{#if album.cover && !artBroken[album.cover]} handleCoverError(event.currentTarget)} /> {:else}
{/if}

{(album.record_type ?? "album").toUpperCase()}

{album.title}

{#if year(album)}· {year(album)}{/if} {#if album.track_count}· {album.track_count} tracks{/if} {#if inLibrary}· in your library{/if}

{#each page.tracks as t, i (t.id)} {#if multiDisc && t.disk_number !== (page.tracks[i - 1]?.disk_number ?? (i === 0 ? null : 1))}
Disc {t.disk_number ?? 1}
{/if} {@const locked = t.unreleased} {@const play = () => { if (!locked) playTrack(t); }}
e.key === "Enter" && play()} > {nowPlaying("trackId", t.id) ? "♫" : (t.track_no ?? "·")} {t.title} {#if locked} Unreleased {:else} {fmtDuration(t.duration_secs)} {/if}
{/each}
{/if}