gitoria

tracker

All repositories: gitoria

ReadmeCodePull requestsReleasesTicketsSettings
Commitb32b8440b32b8440Merge hm66-catalogindex: packed catalog indexmreb32b8440/tools/count-incomplete.hl

2.5 KB

  1. // tools/count-incomplete.hl — tracker#33 (mission 029): how many titles are still REDUCED. ONLY on a COPY or a stopped app (opening
  2. // a table rewrites its files; hl:mpackdb: one process per storage):
  3. // TRACKER_STORAGE=$PWD/.scratch/<copy>/storage/mpackdb ./bin/hybriel tools/count-incomplete.hl [--list]
  4. // Counts every live (not merged) non-adult title the details repair still has to do (details.hl needsDetails = shows.hl
  5. // isIncomplete: TMDB's details never went through this app) — by type and origin (migrated / filmography fill / search import)
  6. // and by what its page misses (shows.hl missingParts). Then the COMPLETE titles that still miss a part — TMDB has none (The
  7. // Remaining: no poster, no IMDb id). The last line is the answer: `reduced titles: N` (0 after the repair). `--list` also prints
  8. // every reduced title (type, slug, missing parts). A title whose adult flag is still unknown (adult backfill: TMDB 404) is
  9. // counted too, apart — its completion asks TMDB once more (404 → `detailsCheck`, adult → the flag; never shown either way).
  10. import { args } from 'hl:proc'
  11. import { allShows, missingParts } from '../lib/shows.hl'
  12. import { needsDetails } from '../lib/details.hl'
  13. list = args().includes('--list')
  14. reduced = {}
  15. missing = {}
  16. completeMissing = {}
  17. let total = 0
  18. let n = 0
  19. let adult = 0
  20. for (s of allShows()) {
  21. if (s.mergedInto == null && s.tmdbId != null) {
  22. total = total + 1
  23. if (s.adult == true) { adult = adult + 1 }
  24. parts = missingParts(&s)
  25. if (needsDetails(&s)) {
  26. n = n + 1
  27. origin = s.minimal == true ? 'fill' : (s.oldId != null && ('' + s.oldId).slice(0, 5) == 'tmdb-' ? 'import' : 'migrated')
  28. k = s.type + ' ' + origin + (s.adult == null ? ' (adult flag unknown)' : '')
  29. reduced[k] = reduced[k] == null ? 1 : reduced[k] + 1
  30. for (p of parts) { missing[p] = missing[p] == null ? 1 : missing[p] + 1 }
  31. if (parts.length > 0) { missing['any'] = missing['any'] == null ? 1 : missing['any'] + 1 }
  32. if (list) { console.log('reduced ' + s.type + ' ' + s.urlSegment + ' ' + parts.join(',')) }
  33. } else if (s.adult != true) {
  34. for (p of parts) { completeMissing[p] = completeMissing[p] == null ? 1 : completeMissing[p] + 1 }
  35. }
  36. }
  37. }
  38. console.log('titles with a TMDB id: ' + total + ' (adult ' + adult + ', never completed)')
  39. for (k of reduced.keys()) { console.log(' reduced ' + k + ': ' + reduced[k]) }
  40. console.log(' their pages miss: ' + JSON.stringify(missing))
  41. console.log('complete titles missing a part (TMDB has none): ' + JSON.stringify(completeMissing))
  42. console.log('reduced titles: ' + n)

Branches

Latest commits

  • b32b8440Merge hm66-catalogindex: packed catalog indexmre
  • 2db0f7adReport HM66 heap measurements and validationmre
  • 6ce15623Pack catalog lists and membership maps in UTF-8 bytesmre
  • 71134e21HM66 briefmre
  • ed4cbab2status timemre
  • e982c26dlog: HM65 mergedmre
  • 6e72f9d1Merge hm65-fields: episode boot scan reads three fieldsmre
  • 07a5c883HM65 report measured field projection and complete validationmre
  • 0eab858fRead only catalog date fields during the episode boot scanmre
  • d3179273log: HM65 hl:heap vendoringmre
  • cb78a1a0HM65 report missing heap diagnostic package with repromre
  • 89606a5cHM65 briefmre
  • 096ce0d4log: DP69 live on day48mre
  • b3d8a80bDP69 brief, RV48 mergedmre
  • ce6d7d32Merge rv48: Hybriel day48mre
  • 3da2ea86RV48: report day48 cold starts, gates and cleanupmre
  • 8d9ecdfeRV48: re-vendor Hybriel set day48 (source b6a8f429, bin 660a9524)mre
  • 4a802ae7status: RV48 runningmre
  • 0a5412b6RV48 brief, day48 outmre
  • 56665efelog: CB69 mergedmre