gitoria

tracker

All repositories: gitoria

ReadmeCodePull requestsReleasesTicketsSettings
Commit1ef7a3b11ef7a3b1RV44: report day44 gates and migration/restart proofsmre1ef7a3b1/tests/seed-franchises.hl

2.3 KB

  1. // tests/seed-franchises.hl — GATE FIXTURE for tracker.worldapi.org#19 (mission 066, tests/franchises.mjs): movies with TMDB ids
  2. // for the collection seed, written into the gate's storage AFTER tests/seed-show.hl, before the server starts. What the fake TMDB
  3. // says about them (tests/franchises.mjs):
  4. // 9101 Gate Alien (1979), 9102 Gate Aliens (1986), 9103 Gate Alien 3 (1992) → collection 900 "Gate Alien Collection", whose
  5. // parts come OUT of release order, with a part we don't have (9999) and an ADULT one we have (9105, adult = true: never
  6. // asked, never in the timeline)
  7. // 9104 Gate Loner (2000) → collection 901, its only part we have → no timeline
  8. // 9106 Gate Standalone (2001) → no collection
  9. // 9107 Gate Missing (2002) → TMDB answers 404
  10. // Self-assigned ids, one put() each (never update(), see seed-show.hl).
  11. import { MPackDB } from 'hl:mpackdb'
  12. import { env } from 'hl:proc'
  13. storageDir = env('TRACKER_STORAGE')
  14. if (storageDir == null || !storageDir.startsWith('/')) { hlError('set TRACKER_STORAGE, absolute') }
  15. showsTable = new MPackDB(file = storageDir + '/shows.db', primaryKey = '@id', indexes = ['!oldId'])
  16. movie = (id, tmdbId, title, release, slug, adult) => {
  17. showsTable.put({
  18. adult = adult id = id title = title summary = null tmdbSummary = null tmdbId = tmdbId
  19. language = 'en' type = 'movie' release = release year = toNumber(release.slice(0, 4)) image = null urlSegment = slug
  20. episodesCount = null homepage = null imdbId = null seasonsCount = null status = 'Released' tagline = null
  21. tvdbId = null tvmzId = null genres = [] cast = [] seasons = [] oldId = 'fr-' + tmdbId
  22. })
  23. return true
  24. }
  25. movie('fr0000000000f101', 9101, 'Gate Alien', '1979-05-25', 'gate-alien', false)
  26. movie('fr0000000000f102', 9102, 'Gate Aliens', '1986-07-18', 'gate-aliens', false)
  27. movie('fr0000000000f103', 9103, 'Gate Alien 3', '1992-05-22', 'gate-alien-3', false)
  28. movie('fr0000000000f104', 9104, 'Gate Loner', '2000-01-01', 'gate-loner', false)
  29. movie('fr0000000000f105', 9105, 'Gate Adult Alien', '1990-01-01', 'gate-adult-alien', true)
  30. movie('fr0000000000f106', 9106, 'Gate Standalone', '2001-01-01', 'gate-standalone', false)
  31. movie('fr0000000000f107', 9107, 'Gate Missing', '2002-01-01', 'gate-missing', false)
  32. showsTable.persist()
  33. console.log('seed-franchises: 7 movies')

Branches

Latest commits

  • 1ef7a3b1RV44: report day44 gates and migration/restart proofsmre
  • a5f62f6cRV44: re-vendor Hybriel set day44 (source 222edef7, bin 4f0f263e)mre
  • 6159a248Merge branch 'hm62-personindex' into rv44mre
  • a8923d93log: RV44 startedmre
  • cf28cf77mission RV44mre
  • 585782dfLog: tracker#60 Chrome look, STATUS rewrittenmre
  • 147d0172conductor: caramboleyo is the user, not owner/creatorApollo
  • 21dd0cfblog: #60 live measurement, reviewmre
  • 7793cf94HM62b report: person indexes with fixed mpackdbmre
  • b4c8d3a9Document tracker#62 fixed-index migration and GC proofmre
  • 09d66ed5status: #60 livemre
  • 4171672flog: #60 livemre
  • f52862a2log: HM62b startedmre
  • 88fde2c4mission HM62bmre
  • a722e526log: #62 blocked by hybriel#317mre
  • 074a7418log: #62 assigned to Tracker; pending rulemre
  • 06f6ae8fHM62 report: mpackdb index gapmre
  • 66f83de3WIP tracker#62 native person indexes blocked by schema migration gapmre
  • 380ba349Merge packed people order for tracker#62mre
  • 86fe5430log: HM62 startedmre