{#if lib.playlists.length}
{lib.playlists.length} playlist{lib.playlists.length === 1 ? "" : "s"} · {totals.tracks.toLocaleString()} track{totals.tracks === 1 ? "" : "s"}{totals.secs ? " · " + longDur(totals.secs) : ""}{pinned.length ? " · " + pinned.length + " pinned" : ""}
{:else}
No playlists yet
{/if}
openHalf("import")}> Import
New playlist
{#if !lib.playlists.length}
No playlists on this phone yet. Make one here, or add a track to a new one from its sheet. Playlists are part of the library folder, so the ones the desktop keeps come over with it.
{/if}
{#snippet card(p)}
push("playlist", { id: p.id }, screenEl)} onmore={() => openHalf("playlist", { playlist: p })} />
{/snippet}
{#if pinned.length}
Pinned
{#each pinned as p (p.id)}{@render card(p)}{/each}
{#if rest.length}
All playlists {/if}
{/if}
{#if rest.length}
{#each rest as p (p.id)}{@render card(p)}{/each}
{/if}