gitoria

tracker

All repositories: gitoria

ReadmeCodePull requestsReleasesTicketsSettings
Commita1a88bd4a1a88bd4gc1: search skips the stale-key string while no entry is stale; /my/unwatched asks a kept id set instead of building a key string per episode rowmrea1a88bd4/tests/seed-tmdbfix.hl

4.1 KB

  1. // tests/seed-tmdbfix.hl — GATE FIXTURE for tests/tmdbfix.mjs (tracker#36, mission T36): migrated titles of every group of
  2. // tools/tmdb-fix.hl, with watches / follows / a season / episodes hanging on the records, written into a fresh storage dir
  3. // (TRACKER_STORAGE, absolute) while nothing else uses it. Ids are self-assigned literals, one put() per record.
  4. import { MPackDB } from 'hl:mpackdb'
  5. import { env } from 'hl:proc'
  6. storageDir = env('TRACKER_STORAGE')
  7. if (storageDir == null || !storageDir.startsWith('/')) { hlError('set TRACKER_STORAGE, absolute') }
  8. showsTable = new MPackDB(file = storageDir + '/shows.db', primaryKey = '@id', indexes = ['!oldId'])
  9. seasonsTable = new MPackDB(file = storageDir + '/seasons.db', primaryKey = '@id', indexes = ['!oldId'])
  10. episodesTable = new MPackDB(file = storageDir + '/episodes.db', primaryKey = '@id', indexes = ['!oldId'])
  11. watchesTable = new MPackDB(file = storageDir + '/watches.db', primaryKey = '@id', indexes = ['!oldId'])
  12. followsTable = new MPackDB(file = storageDir + '/follows.db', primaryKey = '@id', indexes = ['!oldId'])
  13. title = (id, type, name, slug, tmdbId, year, adultCheck) => {
  14. return { id = id type = type title = name urlSegment = slug tmdbId = tmdbId year = year release = null oldId = 'o' + id adult = false
  15. adultCheck = adultCheck summary = null tmdbSummary = null seasons = [] }
  16. }
  17. withRelease = (r, d) => { x = r x.release = d return x }
  18. showsTable.put(title('mYearMissing000001', 'movie', 'Year Missing', 'Year-Missing', 101, null, null))
  19. showsTable.put(withRelease(title('mOtherYear00000002', 'movie', 'Other Year', 'Other-Year', 102, 2002, null), '2002-03-04'))
  20. showsTable.put(title('mTranslated000003', 'movie', 'Translated', 'Translated', 103, 2010, null))
  21. showsTable.put(title('mGoneUnique000004', 'movie', 'Gone Unique', 'Gone-Unique', 104, 2015, 'TMDB 404'))
  22. showsTable.put(title('sGoneSeries000005', 'series', 'Gone Series', 'Gone-Series', 105, 2011, null))
  23. showsTable.put(title('mGoneMany0000006', 'movie', 'Gone Many', 'Gone-Many', 106, 2012, null))
  24. showsTable.put(title('mGoneOtherYr000007', 'movie', 'Gone Other Year', 'Gone-Other-Year', 107, 2013, null))
  25. showsTable.put(title('mGoneTaken000008', 'movie', 'Gone Taken', 'Gone-Taken', 108, 2016, null))
  26. showsTable.put(title('mTakenHolder000009', 'movie', 'Gone Taken', 'Gone-Taken-2', 109, 2016, null))
  27. showsTable.put(title('mBothDiffer000010', 'movie', 'Both Differ', 'Both-Differ', 110, 2000, null))
  28. showsTable.put(title('mFine00000000011', 'movie', 'Fine', 'Fine', 111, 2005, null))
  29. showsTable.put(title('mGoneNoYear000012', 'movie', 'Gone No Year', 'Gone-No-Year', 112, null, null))
  30. // the series with a season, 2 episodes, a watch on an episode, a season watch and a follow; the movie with a watch and a follow
  31. seasonsTable.put({ id = 'sSeason000000001' seasonNumber = 1 title = null release = null summary = null show = 'sGoneSeries000005' episodes = ['eEp1000000000001', 'eEp2000000000002'] oldId = 'os1' })
  32. episodesTable.put({ id = 'eEp1000000000001' episodeNumber = 1 seasonNumber = 1 title = 'One' summary = null release = '2011-01-01' show = 'sGoneSeries000005' season = 'sSeason000000001' oldId = 'oe1' })
  33. episodesTable.put({ id = 'eEp2000000000002' episodeNumber = 2 seasonNumber = 1 title = 'Two' summary = null release = '2011-01-08' show = 'sGoneSeries000005' season = 'sSeason000000001' oldId = 'oe2' })
  34. watchesTable.put({ id = 'wEp1000000000001' targetType = 'episode' target = 'eEp1000000000001' user = 'uUser00000000001' at = 1700000000000 oldId = 'ow1' })
  35. watchesTable.put({ id = 'wSeason00000002' targetType = 'season' target = 'sSeason000000001' user = 'uUser00000000001' at = 1700000000000 oldId = 'ow2' })
  36. watchesTable.put({ id = 'wMovie000000003' targetType = 'movie' target = 'mGoneUnique000004' user = 'uUser00000000001' at = 1700000000000 oldId = 'ow3' })
  37. followsTable.put({ id = 'fSeries00000001' show = 'sGoneSeries000005' user = 'uUser00000000001' at = 1700000000000 oldId = 'of1' })
  38. followsTable.put({ id = 'fMovie000000002' show = 'mGoneUnique000004' user = 'uUser00000000001' at = 1700000000000 oldId = 'of2' })
  39. showsTable.persist()
  40. seasonsTable.persist()
  41. episodesTable.persist()
  42. watchesTable.persist()
  43. followsTable.persist()
  44. console.log('seeded')

Branches

Latest commits

  • a1a88bd4gc1: search skips the stale-key string while no entry is stale; /my/unwatched asks a kept id set instead of building a key string per episode rowmre
  • cd830744gc1: dbSearch: no split / map / list copy per candidate (scores from the stored text, top list touched only when the hit can enter)mre
  • 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