gitoria

jukebox

All repositories: gitoria

ReadmeCodePull requestsReleasesTicketsSettings
Commit9daebb4b9daebb4bjukebox JB3b: shuffle, now-playing overlay, next and previous, play counting, media session, gates; keyboard left open (Hybriel gap)mre9daebb4b/components/artists.hl

1.0 KB

  1. // components/artists.hl — `/artists`: every artist, by name, with the cover of one of their albums; a tap opens the artist.
  2. parent './main.hl'
  3. import { navigate } from 'hl:web'
  4. import VirtualList from './virtual-list/virtual-list.hl'
  5. import { rowsFor, thousands } from '../lib/rows.hl'
  6. __title = 'Artists · Jukebox'
  7. Hybrid firstRows = rowsFor({ kind = 'artists' }, 0, 100)
  8. Number artistTotal = firstRows.total
  9. Hybrid chunk = firstRows.rows
  10. Number chunkFrom = 0
  11. String countText = thousands(artistTotal) + ' artists'
  12. on artistsLoad(first, wanted) {
  13. let start = first - 20
  14. if (start < 0) { start = 0 }
  15. r = emit server jbRows({ kind = 'artists' }, start, 100)
  16. chunk = r.rows
  17. chunkFrom = r.offset
  18. return null
  19. }
  20. loadRange = (first, wanted) => { emit artistsLoad(first, wanted) }
  21. picked = (id, index) => { navigate('/artists/' + id) }
  22. View {
  23. jbScreen {
  24. jbCount { output { id = "count" countText } }
  25. VirtualList { itemCount = artistTotal rowHeight = 56 loaded = chunk loadedFrom = chunkFrom onRange = loadRange onPick = picked listLabel = "Artists" }
  26. }
  27. }

Branches

Latest commits

  • 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