jukebox
All repositories: gitoria
1.1 KB
// tools/scan.hl — one scan, then the numbers. The server starts it as a child process (lib/schedule.hl) and by hand it is// the way to scan once: JUKEBOX_STORAGE=/abs/storage ./bin/hybriel tools/scan.hl [/library/path ...]// The arguments are library paths (default: the settings). JUKEBOX_PROGRESS=1 prints progress lines for the server.import { args } from 'hl:proc'import { monotonic } from 'hl:time'import { ensureStorage, loadSettings } from '../lib/settings.hl'import { scanLibrary } from '../lib/library.hl'import { libraryStats } from '../lib/browse.hl'ensureStorage()given = args()paths = given.length > 0 ? given : loadSettings().libraryPathst0 = monotonic()r = scanLibrary(paths)console.log('scan: ' + JSON.stringify(r))console.log('stats: ' + JSON.stringify(libraryStats()))console.log('total seconds: ' + ((monotonic() - t0) / 1000000000))// JUKEBOX_DUMP=1: every song as one JSON line (the scanner gate reads these)import { env } from 'hl:proc'import { songsTable } from '../lib/db.hl'if (env('JUKEBOX_DUMP') == '1') {for (s of songsTable.iterate(null, null)) { console.log('SONG ' + JSON.stringify(s)) }}
Branches
Latest commits
- f80504e1Records: day38b repro sentmre
- 8048258bRecords: day38b jb3 regression, L1 Chromes stoppedmre
- 68aace7fRecords: mission 003 day38bmre
- d105d8a9Records: mpackdb integrity check cleanmre
- 6e980c53Records: mpackdb rule refinementmre
- 6d335ac4Records: storage copy rulingmre
- 7eb2898dRecords: mpackdb second-opener rule until day38mre
- b011f98eRecords: style form live on day35mre
- 60d90cb2Records: L1 woken for the restartmre
- 75ae544fRecords: restart waits for the connection to closemre
- e0b75951Records: L1 merged and pushed, restart waits for an open connectionmre
- f2b5db98styles: format styles with nested rules and bare queriesmre
- f036bab4search: format styles with nested rules and bare queriesmre
- ef9a9d4asongs: format styles with nested rules and bare queriesmre
- f22f9aacmain: format styles with nested rules and bare queriesmre
- f56cd7c7Sync icons from 8176eb1 and verify mixed component sourcesmre
- d56e5054Sync theme and shared tokens from layouts 17e0f03mre
- b1362547Re-vendor to Hybriel set day35mre
- 89e10f08Records: mission 002 rollback wordingmre
- 9485dee7Records: mission 002 brief (live step)mre