gitoria

tracker

All repositories: gitoria

ReadmeCodePull requestsReleasesTicketsSettings
Commit33ad4bd533ad4bd5Merge commit 'f57f64f'mre33ad4bd5/tests/seed-art.hl

2.4 KB

  1. // tests/seed-art.hl — GATE FIXTURE for mission 032 (tracker#33 The Remaining: a title TMDB has no poster for; tracker#37: people
  2. // without a photo), written by tests/browser.mjs into the gate's storage while the app is STOPPED (hybriel#21):
  3. // Backdrop Gate Movie (movie 1401): public, no poster file, no runtime — the fake TMDB has no poster, a backdrop, runtime 135
  4. // Backdrop Gate Series (tv 1402): public, no poster file — the fake TMDB has no poster, a backdrop
  5. // Photo Gate Person (TMDB 3401: has a photo), Faceless Person (3402: none), Unknown Person (3403: TMDB 404) — no photo source,
  6. // added "in the future" so they head /people
  7. import { MPackDB } from 'hl:mpackdb'
  8. import { env } from 'hl:proc'
  9. import { now } from 'hl:time'
  10. storageDir = env('TRACKER_STORAGE')
  11. if (storageDir == null || !storageDir.startsWith('/')) { hlError('set TRACKER_STORAGE, absolute') }
  12. showsTable = new MPackDB(file = storageDir + '/shows.db', primaryKey = '@id', indexes = ['!oldId'])
  13. personsTable = new MPackDB(file = storageDir + '/persons.db', primaryKey = '@id', indexes = ['!oldId'])
  14. title = (id, tmdbId, type, name, slug, oldId) => {
  15. showsTable.put({ adult = false id = id title = name summary = null tmdbSummary = 'no poster at TMDB' tmdbId = tmdbId
  16. language = 'fi' type = type release = '2026-09-17' year = 2026 image = null urlSegment = slug
  17. episodesCount = null homepage = null imdbId = null seasonsCount = null status = 'Released' tagline = null
  18. tvdbId = null tvmzId = null genres = [] cast = [] seasons = [] oldId = oldId kind = type == 'series' ? 'series' : null
  19. creditsAt = 1 detailsAt = 1 tmdbSync = 1 })
  20. return true
  21. }
  22. title('art0000000000mv1', 1401, 'movie', 'Backdrop Gate Movie', 'Backdrop-Gate-Movie', 'tmdb-movie-1401')
  23. title('art0000000000tv1', 1402, 'series', 'Backdrop Gate Series', 'Backdrop-Gate-Series', 'tmdb-tv-1402')
  24. later = now() + 86400000
  25. person = (id, name, slug, tmdbId, n) => {
  26. personsTable.put({ id = id name = name urlSegment = slug tmdbId = tmdbId oldId = 'tmdb-person-' + tmdbId gender = 0 image = null tmdbProfile = null
  27. adult = false shows = [] added = later + n })
  28. return true
  29. }
  30. person('art00000000000p1', 'Photo Gate Person', 'Photo-Gate-Person', 3401, 3)
  31. person('art00000000000p2', 'Faceless Person', 'Faceless-Person', 3402, 2)
  32. person('art00000000000p3', 'Unknown Person', 'Unknown-Person', 3403, 1)
  33. showsTable.persist()
  34. personsTable.persist()
  35. console.log('seed-art: 2 titles without a poster, 3 people without a photo')

Branches

Latest commits

  • 33ad4bd5Merge commit 'f57f64f'mre
  • 7d38cec4docker-compose: nofile 65536 (default soft 1024 refused boot: errno 24 in fs.listDir, Hybriel 528bc89f)mre
  • f57f64f0mission 046: report, LOGmre
  • 5965963adeploy: backup copies index files first and *.mpack data last (hot-copy skew, hybriel #203)mre
  • efe1b485mission 046: re-vendor Hybriel master 60b2817b (integration 8, #203): plugins mpackdb + web (bin/ git-ignored: hybriel, libhlrt.a, hlc.o, hlrt/ from native/zig-out)mre
  • 53099ffbmission 046: person page reads a slim per-title credit row cache (no whole-record fetch per credit); gate tests/person-lookup.mjsmre
  • 9b3828aemission 046a: report, LOGmre
  • 4b37356emission 046: franchise seed supersedeCollections reads the curated timelines once (10 s one-tick block at the end of boot)mre
  • ac6268e3mission 046a: re-vendor Hybriel 528bc89f (integration 6): plugins mpackdb/time/web (bin/ git-ignored)mre
  • 322b3293mission 046: photoQueue guard for non-row fetch results (damaged persons index)mre
  • e5b99aecmission 046: photoQueue in slices (people.hl photoQueueStart/Step, jobs.hl photoTick), tests/photoqueue.hlmre
  • 31dcf2admission 045: report, LOGmre
  • 9c3971d0tests/persons-skip-count.hlmre
  • 4d72e365mission 045mre
  • b9cae4c9slices: skip and count non-row values from range(); merge persons pass falls back to iterate; guard testmre
  • 3db7dc31merge w44-jobs-slices into w43-trkmemmre
  • 593dab6fmission 043: report, LOGmre
  • 1a5a4818boot scans back to iterate (slices measured slower: titles 114 s, episodes 141 s, persons failed); lambda per rowmre
  • 03d29893boot scans read primary-key slices (lib/slices.hl from mission 044): iterate is eager too; people view log line back; allShows/allEpisodes stay for toolsmre
  • 23375c58mission 044: report, LOG, STATUSmre