gitoria

tracker

All repositories: gitoria

ReadmeCodePull requestsReleasesTicketsSettings
Commita722e526a722e526log: #62 blocked by hybriel#317mrea722e526/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

  • a722e526log: #62 blocked by hybriel#317mre
  • 074a7418log: #62 assigned to Tracker; pending rulemre
  • 06f6ae8fHM62 report: mpackdb index gapmre
  • 86fe5430log: HM62 startedmre
  • 755307bbmission HM62mre
  • 4b2f2995HM61 report: tracker#61 packed people ordermre
  • 48faa84flog: #60 deploy startedmre
  • 90734c6cMerge branch 'hm60-shortids'mre
  • e0db0d1bHM60 report: tracker#60 packed short-ID ownersmre
  • 3c79b576Pack short-ID ownership into byte buffersmre
  • e822524bstatus wordingmre
  • 1c7f0480log: HM60/HM61 startedmre
  • 2841d215missions HM60 HM61mre
  • 289c6ce4HM1 report: heap object breakdownmre
  • 2e7d6257log: HM1 startedmre
  • 2f790465mission HM1: heap object breakdownmre
  • a18957falog: evening re-measure after CBmre
  • aac9a98dlog: evening re-measure startmre
  • 45163bd4log: person/tmdb error hypothesismre
  • cb38de2blog: swap 503 causemre