gitoria

jukebox

All repositories: gitoria

ReadmeCodePull requestsReleasesTicketsSettings
Branchticket-10a557ac53jukebox#10 review fixes: README file map names lib/background.hl, on Error(Hybrid e) per L10mreticket-10/project.hl

3.6 KB

  1. // project.hl — jukebox: THE MAP. Config, routes and feature wiring. A network media player for the music on loreana; this
  2. // missions: the scanner, the database and the JSON API (JB1); the library screens and playing in the browser (JB2).
  3. //
  4. // WHERE WHAT IS (README "Files"):
  5. // settings (library paths) and the storage folders lib/settings.hl
  6. // reading one file's tags into a song record lib/tags.hl (+ lib/id3.hl, lib/id3-helpers.hl, lib/mpeg.hl)
  7. // the scanner (walk, incremental, vanished files) lib/library.hl (+ lib/scan-state.hl); when it runs: lib/schedule.hl
  8. // startup migration and background event wiring lib/background.hl
  9. // covers cache lib/covers.hl
  10. // the database (the one place that knows mpackdb) lib/db.hl; albums and artists tables: lib/catalog.hl
  11. // pages, search, shuffle, stats lib/browse.hl (+ lib/order-cache.hl)
  12. // the JSON routes lib/api.hl (+ lib/api-helpers.hl, lib/jsoncheck.hl)
  13. // env, text folding, numbers lib/util.hl
  14. // the audio route /stream/<id> (HTTP Range) lib/stream.hl; rows of the lists and the player queue: lib/rows.hl
  15. // the screens components/main.hl (shell + player bar), songs.hl artists.hl albums.hl artist.hl album.hl search.hl
  16. // vendored (components/SOURCE): media-player, virtual-list, icons; theme/ (layouts); all our CSS: components/styles.hl
  17. import WebFramework from 'hl:web'
  18. import { env } from 'hl:proc'
  19. import Styles from './components/styles.hl'
  20. import Songs from './components/songs.hl'
  21. import Artists from './components/artists.hl'
  22. import Albums from './components/albums.hl'
  23. import Artist from './components/artist.hl'
  24. import Album from './components/album.hl'
  25. import Search from './components/search.hl'
  26. import Background from './lib/background.hl'
  27. import { serve as streamSong } from './lib/stream.hl'
  28. import { apiStats, apiSongs, apiArtists, apiAlbums, apiSearch, apiShuffle, apiPlayed, apiCopies, apiQueue, apiCover, apiThumb, apiRescan, apiSettings, apiNotFound } from './lib/api.hl'
  29. static siteName = "jukebox"
  30. appTitle = siteName
  31. styles = Styles
  32. routes = [
  33. { pattern = "/api/stats" function = apiStats }
  34. { pattern = "/api/songs" function = apiSongs }
  35. { pattern = "/api/artists" function = apiArtists }
  36. { pattern = "/api/albums" function = apiAlbums }
  37. { pattern = "/api/search" function = apiSearch }
  38. { pattern = "/api/shuffle" function = apiShuffle }
  39. { pattern = "/api/played/:id" function = apiPlayed }
  40. { pattern = "/api/copies/:id" function = apiCopies }
  41. { pattern = "/api/queue" function = apiQueue }
  42. { pattern = "/api/cover/:id" function = apiCover }
  43. { pattern = "/api/thumb/:id" function = apiThumb }
  44. { pattern = "/stream/:id" function = streamSong }
  45. { pattern = "/api/rescan" function = apiRescan }
  46. { pattern = "/api/settings" function = apiSettings }
  47. { pattern = "/" component = Songs }
  48. { pattern = "/artists" component = Artists }
  49. { pattern = "/albums" component = Albums }
  50. { pattern = "/artists/:id" component = Artist }
  51. { pattern = "/albums/:id" component = Album }
  52. { pattern = "/search" component = Search }
  53. ]
  54. // JUKEBOX_PORT (default 8700, the slot's first port); HL_HOST binds a single interface; JUKEBOX_WATCH=0 = no dev watcher
  55. port = env('JUKEBOX_PORT') != null ? toNumber(env('JUKEBOX_PORT')) : 8700
  56. watching = env('JUKEBOX_WATCH') != '0'
  57. server = new WebFramework(routes = routes, styles = styles, minify = true, port = port, watchMode = watching, sessionCookie = 'jukeboxsid')
  58. // the startup steps and the background event wiring (key migration, scan ticker and child, error handler)
  59. new Background()

Branches

Latest commits

  • a557ac53jukebox#10 review fixes: README file map names lib/background.hl, on Error(Hybrid e) per L10mre
  • 3503b648|||PR jukebox#10: move startup and scan wiring out of project.hl into lib/background.hlmre
  • 536d7c58Merge branch 'playing-row' into mainJukebox
  • 05c3578c|||PR Keep each playing row bound to the shell song on day76mre
  • eaa7e6d6Vendor Hybriel day76 for live parent member readsmre
  • 0923398bMerge branch 'records-1124d' into mainJukebox
  • 78f0cc86|||PR records 2026-11-24: inbox-thread rule, "Not playing" confirmed and closedmre
  • c1b153c4Merge branch 'records-1124c' into mainJukebox
  • d7b5e780|||PR Records 2026-11-24 (2): live day72, PR #19 merge, #10 newsmre
  • 43b564dbMerge branch 'records-1124b' into mainJukebox
  • fa86b08c|||PR Records 2026-11-24: LOG, STATUS, missions 020-023mre
  • 0a2ae3daMerge remote-tracking branch 'origin/records-1123' into records-1124mre
  • 9a48cfcaMerge branch 'vendor-theme' into mainJukebox
  • 170d3735Merge branch 'code-order-2' into mainJukebox
  • 3f1918a7|||PR Re-sync layouts theme 4099e64 with Segoe UI firstmre
  • 2e7f6a43Vendor virtual-list 489afcf from components.hybrielmre
  • 0ba85799Merge branch 'reset-classes' into mainJukebox
  • 502eeed5jukebox#20: vendor virtual-list initial resetKey baseline fixmre
  • 6d5ce287|||PR jukebox#9 Centralize songs table reads and writes in db.hlmre
  • dcca21abjukebox#8 Move copies and queue logic into their topicsmre