gitoria

tracker

All repositories: gitoria

ReadmeCodePull requestsReleasesTicketsSettings
Commit451db7cd451db7cdgc1: show page and check clicks read the kept watched set instead of building one from a by-value copy of every watchmre451db7cd/tests/seed-adult.hl

4.0 KB

  1. // tests/seed-adult.hl — GATE FIXTURE for mission 054 (adult titles): written by tests/browser.mjs into the gate's storage
  2. // while the app is STOPPED (one process per storage, hybriel#21), late in the gate. Self-assigned ids, one put() each.
  3. //
  4. // Adult Gate Movie adult = true (known), followed by alice (TRACKER_SEED_USER) → only on her /my/movies + its page
  5. // Flagless Gate Movie adult unknown, TMDB (fake 1012) says not adult → listed once the backfill asked
  6. // Flagless Adult Movie adult unknown, TMDB (fake 1013) says adult → never listed
  7. // Flagless Gate Series adult unknown, TMDB (fake tv 1014) not adult → on /shows once asked (a released episode)
  8. // Backfill Movie 01…10 adult unknown, TMDB 1101…1110 not adult → the backfill's bulk (resume + latency checks)
  9. // Gone Gate Movie adult unknown, TMDB answers 404 (1120) → marked, stays hidden, never asked again
  10. // All carry `tmdbSync` (tracker#33): they stand for synced titles — the backfill's subject, not the details repair's.
  11. import { MPackDB } from 'hl:mpackdb'
  12. import { env } from 'hl:proc'
  13. import { now } from 'hl:time'
  14. storageDir = env('TRACKER_STORAGE')
  15. if (storageDir == null || !storageDir.startsWith('/')) { hlError('set TRACKER_STORAGE, absolute') }
  16. userId = env('TRACKER_SEED_USER')
  17. showsTable = new MPackDB(file = storageDir + '/shows.db', primaryKey = '@id', indexes = ['!oldId'])
  18. seasonsTable = new MPackDB(file = storageDir + '/seasons.db', primaryKey = '@id', indexes = ['!oldId'])
  19. episodesTable = new MPackDB(file = storageDir + '/episodes.db', primaryKey = '@id', indexes = ['!oldId'])
  20. followsTable = new MPackDB(file = storageDir + '/follows.db', primaryKey = '@id', indexes = ['!oldId'])
  21. movie = (key, title, tmdbId, release, adult, slug) => {
  22. return { id = 'ad0000000000' + key title = title summary = null tmdbSummary = null tmdbId = tmdbId
  23. language = 'en' type = 'movie' release = release year = toNumber(release.slice(0, 4)) image = null urlSegment = slug
  24. episodesCount = null homepage = null imdbId = null seasonsCount = null status = null tagline = null
  25. tvdbId = null tvmzId = null genres = [] cast = [] seasons = [] oldId = 'ad' + key adult = adult tmdbSync = 1 }
  26. }
  27. showsTable.put(movie('mvad', 'Adult Gate Movie', 1011, '2001-02-01', true, 'adult-gate-movie'))
  28. showsTable.put(movie('mvfl', 'Flagless Gate Movie', 1012, '2001-02-02', null, 'flagless-gate-movie'))
  29. showsTable.put(movie('mvfa', 'Flagless Adult Movie', 1013, '2001-02-03', null, 'flagless-adult-movie'))
  30. let i = 1
  31. while (i <= 10) {
  32. let nn = i < 10 ? '0' + i : '' + i
  33. showsTable.put(movie('bf' + nn, 'Backfill Movie ' + nn, 1100 + i, '1990-01-' + nn, null, 'backfill-movie-' + nn))
  34. i = i + 1
  35. }
  36. showsTable.put(movie('mvgo', 'Gone Gate Movie', 1120, '2001-02-04', null, 'gone-gate-movie'))
  37. seasonsTable.put({ id = 'ad00000000sefl' seasonNumber = 1 title = null release = null summary = null show = 'ad0000000000srfl' episodes = ['ad00000000epfl'] oldId = 'adsefl' })
  38. episodesTable.put({ id = 'ad00000000epfl' episodeNumber = 1 seasonNumber = 1 title = 'Flagless Pilot' summary = null release = '2001-03-03' show = 'ad0000000000srfl' season = 'ad00000000sefl' oldId = 'adepfl' })
  39. showsTable.put({ id = 'ad0000000000srfl' title = 'Flagless Gate Series' summary = null tmdbSummary = null tmdbId = 1014
  40. language = 'en' type = 'series' release = '2001-03-03' year = 2001 image = null urlSegment = 'flagless-gate-series'
  41. episodesCount = 1 homepage = null imdbId = null seasonsCount = 1 status = 'Ended' tagline = null
  42. tvdbId = null tvmzId = null genres = [] cast = [] seasons = ['ad00000000sefl'] oldId = 'adsrfl' adult = null tmdbSync = 1 })
  43. if (userId != null && userId != '') {
  44. followsTable.put({ id = 'adf00000000000f1' show = 'ad0000000000mvad' user = userId at = now() oldId = 'gate-follow-adult' })
  45. }
  46. showsTable.persist()
  47. seasonsTable.persist()
  48. episodesTable.persist()
  49. followsTable.persist()
  50. console.log('seed-adult: 15 titles (1 adult, 14 unknown)' + (userId != null && userId != '' ? ', ' + userId + ' follows Adult Gate Movie' : ''))

Branches

Latest commits

  • 451db7cdgc1: show page and check clicks read the kept watched set instead of building one from a by-value copy of every watchmre
  • ddb4127egc1: TRACKER_QSTATS=1 logs queue and cache sizes every 10 s (measurement only)mre
  • da60547fstatus: GC1 done, backup bugmre
  • e4171021log: GC1 result, backup hard-link bugmre
  • f1597214deploy.sh backup: tar --hard-dereference (hot tar stored mpackdb sidecars as hard links to .sessions files)mre
  • 6b58571elog: GC windowmre
  • 5c8baa1fdeploy lock: hold only around deploy.shmre
  • b8dac822log: hybriel#309mre
  • bf676d9elog: GC1 startedmre
  • c7828541mission GC1mre
  • ef949994conductor: neutral ticket rulemre
  • 89e91ef3log: RV39 livemre
  • ee2b677alog: RV39 deployingmre
  • c1c4178cMerge branch 'rv39'mre
  • a016e9abReapply "Merge branch 'rv39'"mre
  • f29e2502log: RV39 gate fixmre
  • d9fce111browser gate #26: exact frame count incl. SL1 people step (hybriel#308)mre
  • ad529ac1log: m572 verdictmre
  • 1b37d404RV39 on hold: hybriel#308mre
  • f9127c68Revert "Merge branch 'rv39'"mre