jukebox
All repositories: gitoria
1.0 KB
// components/artists.hl — `/artists`: every artist, by name, with the cover of one of their albums; a tap opens the artist.parent './main.hl'import { navigate } from 'hl:web'import VirtualList from './virtual-list/virtual-list.hl'import { rowsFor, thousands } from '../lib/rows.hl'__title = 'Artists · Jukebox'Hybrid firstRows = rowsFor({ kind = 'artists' }, 0, 100)Number artistTotal = firstRows.totalHybrid chunk = firstRows.rowsNumber chunkFrom = 0String countText = thousands(artistTotal) + ' artists'on artistsLoad(first, wanted) {let start = first - 20if (start < 0) { start = 0 }r = emit server jbRows({ kind = 'artists' }, start, 100)chunk = r.rowschunkFrom = r.offsetreturn null}loadRange = (first, wanted) => { emit artistsLoad(first, wanted) }picked = (id, index) => { navigate('/artists/' + id) }View {jbScreen {jbCount { output { id = "count" countText } }VirtualList { itemCount = artistTotal rowHeight = 56 loaded = chunk loadedFrom = chunkFrom onRange = loadRange onPick = picked listLabel = "Artists" }}}
Branches
Latest commits
- 63d0f2eejukebox ST1 (jukebox#2): styles of main, songs and search moved into their own Style blocks (styles.hl 81 to 8 rules, pixel-identical at 390 and 1280); artist and album wait for an hl:web fixmre
- c5b8fde9jukebox JB3b: keyboard gap repro as a reportmre
- 9daebb4bjukebox JB3b: shuffle, now-playing overlay, next and previous, play counting, media session, gates; keyboard left open (Hybriel gap)mre
- 59c1373ejukebox JB3 (work in progress): albums without folder and with disc markers folded, compilations, duplicate songs, own play counter, server-side shuffle queuemre
- 2a4cfc55jukebox: library screens (songs, artists, albums, artist, album, search, favourites), compact player bar, /stream with Range, thumbnails, virtual list vendored, ui gate and real-library checkmre
- 93a44212jukebox: report, numbers of the full scan, notes on the index key rulemre
- bf5167dajukebox: index keys without commas (mpackdb loses them after a reopen), comma fixture and gate checksmre
- 28a82fa2jukebox: README, STATUS, LOG, DECISIONSmre
- d13987dfjukebox: library scanner, ID3 reader, mpackdb database and JSON API, with fixtures and a gatemre