gitoria

tracker

All repositories: gitoria

ReadmeCodePull requestsReleasesTicketsSettings
Commitc98e2043c98e2043log: T36A rollbackmrec98e2043/tests/peek-shows.hl

2.0 KB

  1. // tests/peek-shows.hl — the gate's look INTO the shows table (tracker.worldapi.org#18): the description fields the page does
  2. // not show all of. Run only while the app is stopped (hl:mpackdb: one process per storage).
  3. //
  4. // TRACKER_STORAGE=<gate mpackdb> TRACKER_PEEK=1001,1003 ./bin/hybriel tests/peek-shows.hl
  5. // → one line per TMDB id (null prints as ''): peek <tmdbId>|<title>|<summary>|<tmdbSummary>|<tvmazeSummary>|<tagline>|<tmdbSync>
  6. // |<migratedTitle>|<migratedSummary>|<migratedGenres count> (mission 070: what the sync keeps of the migration)
  7. // TRACKER_PEEK_EPISODES=1001 → one line per episode of that title: ep <s>x<e>|<title>|<migratedTitle>|<summary>|<migratedSummary>
  8. // TRACKER_CLEAR_TEXTS=1002 first sets summary and tmdbSummary of that title to null (the TVmaze-only case)
  9. import { env } from 'hl:proc'
  10. import { showsTable, episodesTable } from '../lib/shows.hl'
  11. wanted = env('TRACKER_PEEK') != null ? env('TRACKER_PEEK').split(',') : []
  12. clear = env('TRACKER_CLEAR_TEXTS')
  13. for (s of showsTable.find(null, null)) {
  14. if (s.tmdbId != null && clear != null && '' + s.tmdbId == clear && s.type != 'movie') {
  15. let x = s
  16. x.summary = null
  17. x.tmdbSummary = null
  18. showsTable.update(x.id, x)
  19. console.log('cleared ' + clear)
  20. }
  21. }
  22. showsTable.persist()
  23. for (s of showsTable.find(null, null)) {
  24. if (s.tmdbId != null && wanted.includes('' + s.tmdbId)) {
  25. console.log('peek ' + s.tmdbId + '|' + s.title + '|' + s.summary + '|' + s.tmdbSummary + '|' + s.tvmazeSummary + '|' + s.tagline + '|' + s.tmdbSync
  26. + '|' + s.migratedTitle + '|' + s.migratedSummary + '|' + (s.migratedGenres != null ? s.migratedGenres.length : ''))
  27. }
  28. }
  29. epsOf = env('TRACKER_PEEK_EPISODES')
  30. if (epsOf != null) {
  31. for (s of showsTable.find(null, null)) {
  32. if (s.tmdbId != null && '' + s.tmdbId == epsOf) {
  33. for (e of episodesTable.find(null, null)) {
  34. if (e.show == s.id) { console.log('ep ' + e.seasonNumber + 'x' + e.episodeNumber + '|' + e.title + '|' + e.migratedTitle + '|' + e.summary + '|' + e.migratedSummary) }
  35. }
  36. }
  37. }
  38. }

Branches

Latest commits

  • c98e2043log: T36A rollbackmre
  • ae905f15Merge t36a: tracker#36 apply rechecks, reportmre
  • 796bfaceT36A: report validated fixes, failed live SSH check and verified rollbackmre
  • 55257852log: #53 live, #56 mergedmre
  • 78b39f1bMerge hm56-rows: tracker#56 list builders insert oncemre
  • 7aea52batmdb fix: protect owners without slugs and record passing gatesmre
  • 9b3c2559tmdb fix: revalidate planned identities and reserve target idsmre
  • 6da612fclog: T36A tool defectmre
  • d56ee0daT36A: report unsafe TMDB apply revalidation and stop before livemre
  • 08e55255log: HM56 done, T36A startedmre
  • 91bcdf0eAvoid per-row list copies and reproduce keyed-row blockersmre
  • 5fd2ac75status: #36 GOmre
  • 0d253b45mission: T36Amre
  • 2aa22d23log: #36 GOmre
  • 833aee2flog: #50 closed, HM56 startedmre
  • ac58c1e5mission: HM56mre
  • 58979c0clog: HM54 held for decision, DP65 startedmre
  • bb2ebc67log: #64 live, #53 mergedmre
  • 27cde42fMerge hm53-dom: tracker#53 inputs bound to membersmre
  • 2156cc7flog: HM54 reviewmre