{#if !album}

Artists

{#if libraryStore.albums.length === 0}

Your music will live here

Download an album from Search and it lands here, tagged with art.

{:else}

{artists.length} artists

{#each artists as artist (artist.name)} {/each}
{@const selected = artists.find((a) => a.name === expandedArtist)}
{#if selected}

{selected.name}

{selected.albums.length} albums

{#each selected.albums as a (a.id)} {/each}
{#if inlineAlbum && selected.albums.some((a) => a.id === inlineAlbum.id)}

{inlineAlbum.title}

{inlineAlbum.track_count} tracks{inlineAlbum.year ? ` · ${inlineAlbum.year}` : ""}

{#each inlineTracks as t, i (t.id)} {/each}
{/if} {/if}
{/if}
{:else}
{#if art} {:else}
{/if}

Album

{album.title}

{album.artist} {album.year ? ` · ${album.year}` : ""} · {album.track_count} tracks

{#if showPlaylistMenu} {/if}
{#if artError}

{artError}

{/if}
{#each tracks as t, i (t.id)} {/each}
{/if}