gitoria

jukebox

All repositories: gitoria

ReadmeCodePull requestsReleasesTicketsSettings
Main branchmain10f8a8c8Merge branch 'code-order' into mainJukeboxmain/tools/scan.hl

1.1 KB

  1. // tools/scan.hl — one scan, then the numbers. The server starts it as a child process (lib/schedule.hl) and by hand it is
  2. // the way to scan once: JUKEBOX_STORAGE=/abs/storage ./bin/hybriel tools/scan.hl [/library/path ...]
  3. // The arguments are library paths (default: the settings). JUKEBOX_PROGRESS=1 prints progress lines for the server.
  4. import { args } from 'hl:proc'
  5. import { monotonic } from 'hl:time'
  6. import { ensureStorage, loadSettings } from '../lib/settings.hl'
  7. import { scanLibrary } from '../lib/library.hl'
  8. import { libraryStats } from '../lib/browse.hl'
  9. ensureStorage()
  10. given = args()
  11. paths = given.length > 0 ? given : loadSettings().libraryPaths
  12. t0 = monotonic()
  13. r = scanLibrary(paths)
  14. console.log('scan: ' + JSON.stringify(r))
  15. console.log('stats: ' + JSON.stringify(libraryStats()))
  16. console.log('total seconds: ' + ((monotonic() - t0) / 1000000000))
  17. // JUKEBOX_DUMP=1: every song as one JSON line (the scanner gate reads these)
  18. import { env } from 'hl:proc'
  19. import { songsTable } from '../lib/db.hl'
  20. if (env('JUKEBOX_DUMP') == '1') {
  21. for (s of songsTable.iterate(null, null)) { console.log('SONG ' + JSON.stringify(s)) }
  22. }

Branches

Latest commits

  • 10f8a8c8Merge branch 'code-order' into mainJukebox
  • 204fc828Merge branch 'day72' into mainJukebox
  • 95f5faae|||PR jukebox#7 Drop needless let declarationsmre
  • 33072bb5|||PR Record day72 gates and Chrome proofmre
  • 95f2cd73|||PR Use typed parent methods for screen playback and local server facesmre
  • 6422a020Sync media-player at 51c3818mre
  • b582ba1cVendor complete Hybriel day72 plugin setmre
  • 02dccbc9Merge branch 'records-1119' into mainJukebox
  • a39e1c23|||PR Records: missions 013-015, reconnect fix livemre
  • fc7db075Merge branch 'reconnect-retry' into mainJukebox
  • ac6f4c6fL2: plain declaration for a in pickedNextmre
  • 2f335086Review round 2: only an explicit queue pick drops pend (not the automatic advance); jb23 records every source changemre
  • 3eb6695fReview fixes: action generation, queue pick clears pend, Previous/Next retry the decided request, typed handlersmre
  • 7a53c0c2|||PR A tap lost to a dead socket plays after reconnect (mission 015)mre
  • 1f0cd77bMerge branch 'records-day41' into mainJukebox
  • 67be229f|||PR Records: day41 live (PR #4), mission 012, statusmre
  • 0bb027daconductor: caramboleyo is the user, not owner/creatorApollo
  • 04f5d9d5Merge branch 'day41' into mainJukebox
  • 8ed6da45|||PR README: media-player pin df9e7dfmre
  • d5d45fc3|||PR media-player df9e7df (repeat-one fix), sync pin and SOURCEmre