gitoria

tracker

All repositories: gitoria

ReadmeCodePull requestsReleasesTicketsSettings
Commit6a6d71ea6a6d71eaLog: gitoria membershipmre6a6d71ea/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

  • 6a6d71eaLog: gitoria membershipmre
  • 8b842dc8Log + CONDUCTOR: gitoria PR switch-onmre
  • 6bb7c20estatus: window 2026-11-09mre
  • 5db84974Log: Apollo window GO, AP56b started, BS1 copy removedmre
  • e84586a7Mission AP56bmre
  • 15917f03Record PR workflow rule (gitoria#50)mre
  • 942ac995status: paused workers statemre
  • 44b934e5log: respawn cleanupmre
  • 03a80097Log: Anton GC A/Bmre
  • c7cdef62Log: Apollo STOP, workers pausedmre
  • d0c083fbLog: usage stopmre
  • c6d464e5Log: Apollo GO backlog, AP56 and BS1 startedmre
  • 1eb6f1a1Missions AP56, BS1mre
  • 4871f8adLog: AP52 live on day52, browser gate greenmre
  • d9bf2988Merge ap52: day52, tracker#58 server argument, #51 modal close rule, #56 keyed season rowsmre
  • c4a60ef2Log: RT52 retest passed, AP52 startedmre
  • 83760a55Browser gate: search results belong to the address form of the typed text (tracker#52 navigate replace)mre
  • 6e951d91AP52: show-page rows are keyed records; closing a season is one upsert and removes (tracker#56, hybriel#331)mre
  • 3bb4ccddAP52: modal close button refers to its nested rule with Style.buttonModalX (tracker#51, hybriel#333)mre
  • ba16933fAP52: login callback and title route are static handlers taking the server as third argument (tracker#58, hybriel#332)mre