tracker
All repositories: gitoria
2.5 KB
// tools/count-incomplete.hl — tracker#33 (mission 029): how many titles are still REDUCED. ONLY on a COPY or a stopped app (opening// a table rewrites its files; hl:mpackdb: one process per storage):// TRACKER_STORAGE=$PWD/.scratch/<copy>/storage/mpackdb ./bin/hybriel tools/count-incomplete.hl [--list]// Counts every live (not merged) non-adult title the details repair still has to do (details.hl needsDetails = shows.hl// isIncomplete: TMDB's details never went through this app) — by type and origin (migrated / filmography fill / search import)// and by what its page misses (shows.hl missingParts). Then the COMPLETE titles that still miss a part — TMDB has none (The// Remaining: no poster, no IMDb id). The last line is the answer: `reduced titles: N` (0 after the repair). `--list` also prints// every reduced title (type, slug, missing parts). A title whose adult flag is still unknown (adult backfill: TMDB 404) is// counted too, apart — its completion asks TMDB once more (404 → `detailsCheck`, adult → the flag; never shown either way).import { args } from 'hl:proc'import { allShows, missingParts } from '../lib/shows.hl'import { needsDetails } from '../lib/details.hl'list = args().includes('--list')reduced = {}missing = {}completeMissing = {}let total = 0let n = 0let adult = 0for (s of allShows()) {if (s.mergedInto == null && s.tmdbId != null) {total = total + 1if (s.adult == true) { adult = adult + 1 }let parts = missingParts(&s)if (needsDetails(&s)) {n = n + 1let origin = s.minimal == true ? 'fill' : (s.oldId != null && ('' + s.oldId).slice(0, 5) == 'tmdb-' ? 'import' : 'migrated')let k = s.type + ' ' + origin + (s.adult == null ? ' (adult flag unknown)' : '')reduced[k] = reduced[k] == null ? 1 : reduced[k] + 1for (p of parts) { missing[p] = missing[p] == null ? 1 : missing[p] + 1 }if (parts.length > 0) { missing['any'] = missing['any'] == null ? 1 : missing['any'] + 1 }if (list) { console.log('reduced ' + s.type + ' ' + s.urlSegment + ' ' + parts.join(',')) }} else if (s.adult != true) {for (p of parts) { completeMissing[p] = completeMissing[p] == null ? 1 : completeMissing[p] + 1 }}}}console.log('titles with a TMDB id: ' + total + ' (adult ' + adult + ', never completed)')for (k of reduced.keys()) { console.log(' reduced ' + k + ': ' + reduced[k]) }console.log(' their pages miss: ' + JSON.stringify(missing))console.log('complete titles missing a part (TMDB has none): ' + JSON.stringify(completeMissing))console.log('reduced titles: ' + n)
Branches
Latest commits
- 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
- 9fb82efclog: HM54 gap, fill continuesmre
- b632eb8dlog: HM53 done, HM54 startedmre
- ccb1a263tracker#53: bind editor drafts and use key event focus targetmre
- 3356fcfclog: #52 blocked, HM53 startedmre
- 833dcfc9Merge hm52-search: report only, tracker#52 blocked by framework gapmre
- 73010cc0HM52: report replace-navigation search draft regressionmre
- 1742e92bstatus: DP64 and HM52 runningmre
- 29ad5b58log: #64 merged, DP64 and HM52 startedmre
- fafddbf9Merge hm64-catalog: tracker#64 catalog from packed entriesmre
- b2e2206dlog: #63 livemre
- 5831e0e0log: HM64 donemre