Library

{#if loading}

Loading library...

{:else if error}

{error}

{:else if artists.length === 0 && albums.length === 0}

No music found in your music folder.

{:else}
  • {#if viewMode === 'artists'}
    {#each artists as artist, i} handleArtistClick(i)} > {/each}
    Artist Albums Tracks
    {#if artist.primaryCoverArt} {artist.name} cover {:else}
    {/if}
    {artist.name} {artist.albums.length} {getTotalTracks(artist)}
    {:else}
    {#each albums as album, i} handleAlbumClick(album, i)} > {/each}
    Album Artist Year Tracks
    {#if album.coverArtPath} {album.title} cover {:else}
    {/if}
    {album.title} {album.artist} {album.year ?? '—'} {album.trackCount}
    {/if}
    {/if}