gitoriaLog in with ident

tracker

All repositories: gitoria

ReadmeCodePull requestsReleasesTicketsSettings
Commit1ad19c8c1ad19c8ctracker: re-vendor Hybriel master 8efba065 (#126 GC by bytes, #48 lambda parameters copy) (mission 070): bin/hybriel sha256 50361e95…, plugins core crypto data fetch fs http http1 mpackdb proc smtp time web; lambda audit: 13 lambdas change a passed record/list (11 through a local alias), no caller relies on it — unchanged; 319 read-only lambda parameters get & (no copy per call: /my/schedule 2.35 → 0.46 s, /my/unwatched 13.7 → 5.7 s on the real copy); /my/unwatched one merge sort instead of n² inserts; docker-compose HL_GC_BYTES=268435456; deploy.sh runs kinds.mjs + franchises.mjs too (default ports 8700–8710); tests/realdata-070.mjs; gates browser 325/0, kinds 32/0, franchises 50/0mre1ad19c8c/people.hl

19.7 KB

  1. // people.hl — THE PERSON PAGE's data (tracker.worldapi.org#16, components/person.hl `/person/<slug>`): a person by slug,
  2. // their facts and filmography, and the ONE-TIME fetch of their whole filmography from TMDB on the first visit. Creator:
  3. // "the movies come from artist scrolls. when one clicks on an artist that has no dataset yet the old version fetched that
  4. // artist and its entire bibilogrqphy so its profile was complete".
  5. //
  6. // personBySlug(slug) the person (slug = `urlSegment`) — a slug → id map built once (15k people, one scan)
  7. // personInfoOf(p) name, photo URL, born/died lines, bio
  8. // filmographyOf(p) their credits (`p.shows`): poster, title, year, role, kind — newest first, adult titles hidden
  9. // personFillStep(id) ONE step of the fetch, called again and again by the page until it answers `done`:
  10. // 1st call: GET <TMDB>/person/<tmdbId>?append_to_response=combined_credits (ONE request: details +
  11. // every cast/crew credit) + the photo (w185, like the posters); the person's facts are updated;
  12. // every next call stores the next `fillBatch` titles; the last one links the credits and marks
  13. // the person complete (`filmographyAt`, ms). hl:web serves one request at a time — between two
  14. // steps every other request is served, so a person with 300 credits never holds the server.
  15. //
  16. // COMPLETE = `filmographyAt` set: never fetched again (the daily sync may refresh followed people later — not built).
  17. // Migrated people are NOT complete (153 of them carry the old tracker's credits — kept, the fetch adds the rest).
  18. // A title we don't have → a MINIMAL show record (title, year, type, tmdbId, `adult`, overview, genres by TMDB id, language;
  19. // no seasons, no poster file; `minimal = true` — details.hl completes it when it is opened or by the repair job, tracker#26), shaped like search.hl importTitle's
  20. // (`oldId tmdb-<tv|movie>-<id>`, a free slug), indexed for the search and put into the public lists (catalog.hl).
  21. // The person's credits (`shows`, the migrated field): [{ show, character, posterPath, adult }] — `character` is the role
  22. // text (the characters, then crew jobs like "Director", " / " between them); `posterPath` = TMDB's, so the page can show
  23. // TMDB's small poster (w92, like search's web rows) until we have the file. ADULT (TMDB's flag, mission 054): a row is
  24. // shown only for a PUBLIC title (shows.hl `isPublicTitle`: `adult == false`, unknown hidden like the public lists) whose
  25. // credit is not adult either (mission 056 merge).
  26. // ONE PROCESS PER STORAGE (hybriel#21); new rows get self-assigned 16-hex ids (hybriel#113), like tmdbsync.hl.
  27. import { now } from 'hl:time'
  28. import { fetch } from 'hl:fetch'
  29. import { randomBytes } from 'hl:crypto'
  30. import { writeFile, mkDir, exists } from 'hl:fs'
  31. import { personsTable, showsTable, genresTable, storageDir, showById, showYear, posterUrlOf, isPublicTitle, titlePath, typeWordOf, typeClassOf } from './shows.hl'
  32. import { tmdbGet, tmdbImageBase, textOr } from './tmdbsync.hl'
  33. import { titleIdByTmdb, indexShow, slugOf, slugBaseOf, indexPerson } from './search.hl'
  34. import { refreshCatalogShow, sortDesc } from './catalog.hl'
  35. import { claimShortId } from './shortids.hl'
  36. static profilesDir = storageDir + '/profiles'
  37. // titles stored per step (real data: see STATUS.md ticket #16 for the per-step time)
  38. static fillBatch = 40
  39. static listOr = (&v) => { return v == null ? [] : v }
  40. // ---- the person -------------------------------------------------------------------------------------------------
  41. static slugIndex = { built = false ids = {} }
  42. static ensureSlugIndex = () => {
  43. if (!slugIndex.built) {
  44. let m = {}
  45. for (p of personsTable.find(null, null)) { if (p.urlSegment != null) { m[p.urlSegment] = p.id } }
  46. slugIndex.ids = m
  47. slugIndex.built = true
  48. }
  49. return true
  50. }
  51. static personBySlug = (&slug) => {
  52. if (slug == null || hlTypeName(slug) != 'String' || slug == '') { return null }
  53. ensureSlugIndex()
  54. let id = slugIndex.ids[slug]
  55. return id == null ? null : personsTable.fetch(id)
  56. }
  57. static isComplete = (&p) => { return p.filmographyAt != null }
  58. // the page asks TMDB for this person: not complete yet, and TMDB knows them
  59. static needsFill = (&p) => { return !isComplete(p) && p.tmdbId != null }
  60. // the photo: /profiles/<oldId>.<ext> (project.hl profileRoute) — only when the file is there (the migrated `image` = 'jpg'
  61. // of 129 people never came with a file)
  62. static profileName = (&p) => {
  63. if (p.oldId == null || p.image == null || p.image == '') { return null }
  64. return p.oldId + '.' + p.image
  65. }
  66. static photoUrlOf = (&p) => {
  67. let name = profileName(p)
  68. return name != null && exists(profilesDir + '/' + name) ? '/profiles/' + name : ''
  69. }
  70. static monthNames = ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December']
  71. // '1986-03-04' → '4 March 1986'; a bare year or anything else as it is
  72. static dateText = (&d) => {
  73. let t = textOr(d)
  74. if (t == null) { return null }
  75. if (t.length < 10) { return t }
  76. let m = toNumber(t.slice(5, 7))
  77. let day = toNumber(t.slice(8, 10))
  78. if (m == null || day == null || m < 1 || m > 12) { return t }
  79. return day + ' ' + monthNames[m - 1] + ' ' + t.slice(0, 4)
  80. }
  81. // { name, photoUrl, born, died, bio } — every field a plain string ('' = none)
  82. static personInfoOf = (&p) => {
  83. let born = dateText(p.birthDate)
  84. let place = textOr(p.birthPlace)
  85. let bornText = ''
  86. if (born != null && place != null) { bornText = 'Born ' + born + ' in ' + place } else if (born != null) { bornText = 'Born ' + born } else if (place != null) { bornText = 'Born in ' + place }
  87. let died = dateText(p.deathDate)
  88. return { name = p.name != null ? p.name : '' photoUrl = photoUrlOf(p) born = bornText died = died != null ? 'Died ' + died : ''
  89. bio = textOr(p.biography) != null ? p.biography : '' }
  90. }
  91. // ---- the filmography --------------------------------------------------------------------------------------------
  92. // the credits, one row per title (a title twice — the migrated credit and TMDB's — is ONE row, roles merged), newest
  93. // first by the title's release ('YYYY-MM-DD', else its year), undated last; only public titles (no adult/unknown)
  94. static filmographyOf = (&p) => {
  95. let byShow = {}
  96. let order = []
  97. for (c of listOr(p.shows)) {
  98. if (c != null && c.show != null) {
  99. let role = textOr(c.character)
  100. let prev = byShow[c.show]
  101. if (prev == null) {
  102. byShow[c.show] = { role = role != null ? role : '' posterPath = textOr(c.posterPath) adult = c.adult == true }
  103. order.push(c.show)
  104. } else {
  105. let x = prev
  106. if (role != null && !(' / ' + x.role + ' / ').includes(' / ' + role + ' / ')) { x.role = x.role == '' ? role : x.role + ' / ' + role }
  107. if (x.posterPath == null) { x.posterPath = textOr(c.posterPath) }
  108. if (c.adult == true) { x.adult = true }
  109. byShow[c.show] = x
  110. }
  111. }
  112. }
  113. let list = []
  114. for (sid of order) {
  115. let c = byShow[sid]
  116. let s = showById(sid)
  117. if (isPublicTitle(s) && !c.adult) {
  118. let y = showYear(s)
  119. let release = textOr(s.release)
  120. let key = release != null && release.length >= 4 ? release : (y != null ? y : '')
  121. let poster = posterUrlOf(s)
  122. if (poster == '/posters/none' && c.posterPath != null) { poster = tmdbImageBase + '/w92' + c.posterPath }
  123. list.push({ key = key id = s.id title = s.title year = y != null ? y : '' href = titlePath(s) posterUrl = poster
  124. role = c.role typeLabel = typeWordOf(s) typeClass = typeClassOf(s) })
  125. }
  126. }
  127. let out = []
  128. let undated = []
  129. for (r of sortDesc(list)) { if (r.key == '') { undated.push(r) } else { out.push(r) } }
  130. for (r of undated) { out.push(r) }
  131. return out
  132. }
  133. // ---- the fetch ------------------------------------------------------------------------------------------------
  134. // person id → { items, pos, credits, added, requests, started, steps } while a fetch is under way (in memory: a restart
  135. // loses it — the titles stored so far are found again by TMDB id, nothing is duplicated)
  136. static jobs = {}
  137. // TMDB genre id → ours (our genres carry TMDB's id)
  138. static genreMap = { built = false ids = {} }
  139. static genreIdsOfTmdb = (&tmdbIds) => {
  140. if (!genreMap.built) {
  141. let m = {}
  142. for (g of genresTable.find(null, null)) { if (g.tmdbId != null) { m['' + g.tmdbId] = g.id } }
  143. genreMap.ids = m
  144. genreMap.built = true
  145. }
  146. let out = []
  147. for (t of listOr(tmdbIds)) {
  148. let id = genreMap.ids['' + t]
  149. if (id != null && !out.includes(id)) { out.push(id) }
  150. }
  151. return out
  152. }
  153. // TMDB's combined_credits → one item per title (cast AND crew of the same title merged), TV + movies only
  154. static creditItems = (&cc) => {
  155. let byKey = {}
  156. let order = []
  157. let all = []
  158. if (cc != null) {
  159. for (c of listOr(cc.cast)) { all.push({ credit = c role = textOr(c.character) }) }
  160. for (c of listOr(cc.crew)) { all.push({ credit = c role = textOr(c.job) }) }
  161. }
  162. for (a of all) {
  163. let c = a.credit
  164. let kind = c.media_type
  165. if ((kind == 'tv' || kind == 'movie') && c.id != null && hlTypeName(c.id) == 'Number') {
  166. let k = kind + ':' + c.id
  167. let known = byKey[k]
  168. if (known == null) {
  169. let name = kind == 'tv' ? textOr(c.name) : textOr(c.title)
  170. if (name != null) {
  171. byKey[k] = { kind = kind tmdbId = c.id title = name release = textOr(kind == 'tv' ? c.first_air_date : c.release_date)
  172. overview = textOr(c.overview) language = textOr(c.original_language) genreIds = listOr(c.genre_ids)
  173. posterPath = textOr(c.poster_path) adult = c.adult == true role = a.role != null ? a.role : '' }
  174. order.push(k)
  175. }
  176. } else if (a.role != null && !(' / ' + known.role + ' / ').includes(' / ' + a.role + ' / ')) {
  177. let x = known
  178. x.role = x.role == '' ? a.role : x.role + ' / ' + a.role
  179. byKey[k] = x
  180. }
  181. }
  182. }
  183. let out = []
  184. for (k of order) { out.push(byKey[k]) }
  185. return out
  186. }
  187. // the photo: w185 → storage/mpackdb/profiles/<oldId>.<ext> — { requests, image, tmdbProfile, failed }
  188. static syncProfile = (&p, profilePath) => {
  189. let out = { requests = 0 image = p.image tmdbProfile = p.tmdbProfile failed = null }
  190. if (textOr(profilePath) == null || p.oldId == null) { return out }
  191. let parts = profilePath.split('.')
  192. let ext = parts[parts.length - 1].toLowerCase()
  193. if (ext != 'jpg' && ext != 'jpeg' && ext != 'png' && ext != 'webp') { return out }
  194. let file = profilesDir + '/' + p.oldId + '.' + ext
  195. if (exists(file) && p.tmdbProfile == profilePath && p.image == ext) { return out }
  196. out.requests = 1
  197. let r = fetch(tmdbImageBase + '/w185' + profilePath, { headers = { 'user-agent' = 'tracker.worldapi.org (person page)' } timeoutMs = 20000 })
  198. if (r == null || r.status != 200 || r.body == null || r.body.length == 0) {
  199. out.failed = 'photo ' + profilePath + ': ' + (r == null ? 'no answer' : 'HTTP ' + r.status)
  200. return out
  201. }
  202. mkDir(profilesDir)
  203. writeFile(file, toBytes(r.body), 420)
  204. out.image = ext
  205. out.tmdbProfile = profilePath
  206. return out
  207. }
  208. // step 1: TMDB's person + credits; the facts (a TMDB value that is empty never overwrites ours) and the photo
  209. static startFill = (p) => {
  210. let t0 = now()
  211. let d = tmdbGet('/person/' + p.tmdbId + '?append_to_response=combined_credits')
  212. if (d.failed != null) { return { error = 'TMDB: ' + d.failed } }
  213. let items = creditItems(d.combined_credits)
  214. let photo = syncProfile(p, d.profile_path)
  215. let x = p
  216. if (textOr(d.biography) != null) { x.biography = d.biography }
  217. if (textOr(d.birthday) != null) { x.birthDate = d.birthday }
  218. if (textOr(d.deathday) != null) { x.deathDate = d.deathday }
  219. if (textOr(d.place_of_birth) != null) { x.birthPlace = d.place_of_birth }
  220. if (textOr(x.imdbId) == null && textOr(d.imdb_id) != null) { x.imdbId = d.imdb_id }
  221. if (d.adult != null) { x.adult = d.adult == true }
  222. x.image = photo.image
  223. x.tmdbProfile = photo.tmdbProfile
  224. if (personsTable.update(x.id, x) == null) { return { error = 'could not store the person: ' + personsTable.lastError() } }
  225. if (photo.failed != null) { console.log('person fill: ' + p.name + ': ' + photo.failed) }
  226. jobs[p.id] = { items = items pos = 0 credits = [] added = 0 requests = 1 + photo.requests started = t0 steps = 1 tmdbMs = now() - t0 }
  227. return { done = false pos = 0 total = items.length }
  228. }
  229. // a title we don't have: the minimal record (shape: search.hl importTitle) → its id, or null
  230. static addMinimalTitle = (&cr, &pid, pname) => {
  231. let kindType = cr.kind == 'tv' ? 'series' : 'movie'
  232. let rel = cr.release
  233. let yr = rel != null && rel.length >= 4 ? toNumber(rel.slice(0, 4)) : null
  234. let slug = slugOf(cr.title, cr.tmdbId)
  235. let record = {
  236. id = randomBytes(8, 'hex') title = cr.title summary = null tmdbSummary = cr.overview tmdbId = cr.tmdbId
  237. language = cr.language type = kindType release = rel year = yr image = null
  238. urlSegment = slug episodesCount = null homepage = null imdbId = null seasonsCount = null
  239. status = null tagline = null tvdbId = null tvmzId = null genres = genreIdsOfTmdb(cr.genreIds)
  240. cast = [{ person = pid character = cr.role actor = pname }] seasons = [] oldId = 'tmdb-' + cr.kind + '-' + cr.tmdbId
  241. adult = cr.adult imported = now() minimal = true
  242. }
  243. // mission 060: its short id (shortids.hl — unique across shows and persons)
  244. record.shortId = claimShortId('show', record.id, record.oldId)
  245. if (showsTable.put(record) == null) {
  246. console.log('person fill: "' + cr.title + '" not stored: ' + showsTable.lastError())
  247. return null
  248. }
  249. indexShow(record)
  250. refreshCatalogShow(record.id)
  251. return record.id
  252. }
  253. // every next step: the next `fillBatch` titles; the last one links the credits and marks the person complete
  254. static fillStep = (p, jobIn) => {
  255. let job = jobIn
  256. let total = job.items.length
  257. let end = job.pos + fillBatch
  258. if (end > total) { end = total }
  259. let credits = job.credits
  260. let added = job.added
  261. let pid = p.id
  262. let pname = p.name
  263. let i = job.pos
  264. while (i < end) {
  265. let item = job.items[i]
  266. let sid = titleIdByTmdb(item.kind == 'tv' ? 'series' : 'movie', item.tmdbId)
  267. if (sid == null) {
  268. sid = addMinimalTitle(item, pid, pname)
  269. if (sid != null) { added = added + 1 }
  270. }
  271. if (sid != null) { credits.push({ show = sid character = item.role posterPath = item.posterPath adult = item.adult }) }
  272. i = i + 1
  273. }
  274. job.pos = end
  275. job.credits = credits
  276. job.added = added
  277. job.steps = job.steps + 1
  278. jobs[pid] = job
  279. if (end < total) { return { done = false pos = end total = total } }
  280. // done: the credits (+ the migrated ones TMDB no longer lists), complete
  281. let have = {}
  282. let all = []
  283. for (c of credits) { have[c.show] = true all.push(c) }
  284. for (c of listOr(p.shows)) { if (c != null && c.show != null && have[c.show] != true) { all.push(c) } }
  285. let x = p
  286. x.shows = all
  287. x.filmographyAt = now()
  288. if (personsTable.update(x.id, x) == null) { return { error = 'could not store the filmography: ' + personsTable.lastError() } }
  289. personsTable.persist()
  290. showsTable.persist()
  291. jobs[pid] = null
  292. console.log('person fill: ' + pname + ' (tmdb ' + p.tmdbId + ') credits=' + total + ' added=' + added + ' requests=' + job.requests + ' steps=' + job.steps + ' tmdbMs=' + job.tmdbMs + ' ms=' + (now() - job.started))
  293. return { done = true pos = total total = total added = added }
  294. }
  295. // one step for the person with this id: { done, pos, total } or { error }
  296. static personFillStep = (&personId) => {
  297. let p = personsTable.fetch(personId)
  298. if (p == null) { return { error = 'no such person' } }
  299. if (isComplete(p)) { return { done = true } }
  300. if (p.tmdbId == null) { return { error = 'TMDB does not know this person' } }
  301. let job = jobs[personId]
  302. if (job == null) { return startFill(p) }
  303. return fillStep(p, job)
  304. }
  305. // ---- people from a title's cast (tracker#26, details.hl completeStep) ------------------------------------------
  306. // TMDB person id → our person id, built once (15k people, one scan), kept up to date by castPersonId
  307. // (flat statics, written key by key like search.hl's haveTmdb: `let m = …ids` would copy the whole map — plain data
  308. // deep-copies on assignment)
  309. static personTmdbBuilt = { yes = false }
  310. static personTmdbIds = {}
  311. static personIdByTmdb = (&tmdbId) => {
  312. if (!personTmdbBuilt.yes) {
  313. for (p of personsTable.find(null, null)) { if (p.tmdbId != null) { personTmdbIds['' + p.tmdbId] = p.id } }
  314. personTmdbBuilt.yes = true
  315. }
  316. return personTmdbIds['' + tmdbId]
  317. }
  318. // a free person slug: "Maya-Rudolph", taken → "-2", … (the migrated people's form)
  319. static personSlugOf = (&name, &tmdbId) => {
  320. ensureSlugIndex()
  321. let base = slugBaseOf(name, 'person-' + tmdbId)
  322. if (slugIndex.ids[base] == null) { return base }
  323. let n = 2
  324. while (slugIndex.ids[base + '-' + n] != null) { n = n + 1 }
  325. return base + '-' + n
  326. }
  327. // how many people castPersonId added since the start (details.hl counts a title's new people by the difference, tracker#28)
  328. static castPeopleAdded = { n = 0 }
  329. static castPeopleCount = () => { return castPeopleAdded.n }
  330. // our person for one cast entry of TMDB ({ tmdbId, name, character, gender }) — the one we have by TMDB id, else a NEW
  331. // person (name, tmdbId, a free slug, this one credit; not complete: their page fetches the rest on the first visit like any
  332. // migrated person). Answers the id, or null when it could not be stored. Also a CREW person (tracker#28: `character` = the
  333. // job, "Director").
  334. static castPersonId = (&c, &showId) => {
  335. let have = personIdByTmdb(c.tmdbId)
  336. if (have != null) { return have }
  337. let record = { id = randomBytes(8, 'hex') name = c.name tmdbId = c.tmdbId urlSegment = personSlugOf(c.name, c.tmdbId) oldId = 'tmdb-person-' + c.tmdbId
  338. gender = c.gender image = null tmdbProfile = null adult = false birthDate = null birthPlace = null deathDate = null imdbId = null
  339. shows = showId != null ? [{ show = showId character = c.character }] : [] added = now() }
  340. // mission 062 (tracker#27 for #26/#28): every person the app creates gets its short id at once (shortids.hl)
  341. record.shortId = claimShortId('person', record.id, record.oldId)
  342. if (personsTable.put(record) == null) {
  343. console.log('details: person "' + c.name + '" not stored: ' + personsTable.lastError())
  344. return null
  345. }
  346. personTmdbIds['' + c.tmdbId] = record.id
  347. slugIndex.ids[record.urlSegment] = record.id
  348. indexPerson(record)
  349. castPeopleAdded.n = castPeopleAdded.n + 1
  350. return record.id
  351. }
  352. // ---- GUEST STARS (mission 062): a series' guests are NOT person records — details.hl stores them on the title ({ tmdbId, actor,
  353. // character, profile, episodes, guest }, `person` only when we have them already). 160k people (most of them one-episode guests)
  354. // cost 3.3 GB of RSS at boot (w061). A guest's link is `/person/tmdb/<tmdbId>?show=<show id>` (project.hl guestRoute): the FIRST
  355. // open creates the person (name + role from that title's guest entry; without one — an old link — TMDB's /person/<id>), with its
  356. // short id, then the person page fills it like any other.
  357. static guestOf = (&showId, &tmdbId) => {
  358. let s = showId != null && hlTypeName(showId) == 'String' && showId != '' ? showsTable.fetch(showId) : null
  359. if (s == null) { return null }
  360. for (c of listOr(s.cast)) { if (c != null && c.tmdbId == tmdbId && textOr(c.actor) != null) { return c } }
  361. return null
  362. }
  363. // our person for this TMDB person (created now when we have none) → { id, created } or { error }
  364. static guestPersonId = (tmdbId, showId) => {
  365. let have = personIdByTmdb(tmdbId)
  366. if (have != null) { return { id = have created = false } }
  367. let g = guestOf(showId, tmdbId)
  368. let c = null
  369. let inShow = null
  370. if (g != null) {
  371. c = { tmdbId = tmdbId name = g.actor character = g.character gender = null }
  372. inShow = showId
  373. } else {
  374. let d = tmdbGet('/person/' + tmdbId)
  375. if (d.failed != null) { return { error = 'TMDB: ' + d.failed } }
  376. if (textOr(d.name) == null || d.adult == true) { return { error = 'no such person' } }
  377. c = { tmdbId = tmdbId name = d.name character = null gender = d.gender }
  378. }
  379. let pid = castPersonId(c, inShow)
  380. if (pid == null) { return { error = 'could not store the person' } }
  381. personsTable.persist()
  382. console.log('guest opened: ' + c.name + ' (tmdb ' + tmdbId + ') → new person ' + pid + (inShow != null ? ' from show ' + inShow : ' from TMDB'))
  383. return { id = pid created = true }
  384. }

Branches

Latest commits

  • 1ad19c8ctracker: re-vendor Hybriel master 8efba065 (#126 GC by bytes, #48 lambda parameters copy) (mission 070): bin/hybriel sha256 50361e95…, plugins core crypto data fetch fs http http1 mpackdb proc smtp time web; lambda audit: 13 lambdas change a passed record/list (11 through a local alias), no caller relies on it — unchanged; 319 read-only lambda parameters get & (no copy per call: /my/schedule 2.35 → 0.46 s, /my/unwatched 13.7 → 5.7 s on the real copy); /my/unwatched one merge sort instead of n² inserts; docker-compose HL_GC_BYTES=268435456; deploy.sh runs kinds.mjs + franchises.mjs too (default ports 8700–8710); tests/realdata-070.mjs; gates browser 325/0, kinds 32/0, franchises 50/0mre
  • 46b21389tracker (mission 070, conductor): the sync never destroys migrated data — the one-time summary step MOVES a copied summary to migratedSummary (marker summaries-moved.txt) instead of clearing it; a migrated record's first title/genres/homepage/tagline TMDB replaces → migratedTitle/migratedGenres/migratedHomepage/migratedTagline, a migrated season's/episode's title/summary → migratedTitle/migratedSummary (set once); tests/peek-shows.hl prints them; gate 325/0mre
  • 749019b0Merge t19 (tracker#19 franchises + timelines) into main (mission 070): conflicts README/STATUS/show.hl/project.hl/browser.mjs/faketmdb.mjs, both sides kept; franchise/timeline pages get #20's typed heading (Franchise | …, Timeline | …), their title links via titlePath (/movies|/series|/shows); the collection seed waits for repair, kinds and credits too; franchises.mjs URLs + 2 new checks; gates browser 323/0, kinds 32/0, franchises 50/0mre
  • daf49feaMerge t20 (tracker#20 typed headings + #21 series/shows split) into main (mission 070): conflicts README/STATUS/show.hl/project.hl/search.hl/components/search.hl/browser.mjs/faketmdb.mjs, both sides kept; clock order backfill → repair → kinds → credits; withDetailsFields stores tmdbType + kind; gates: browser.mjs URLs → /series|/movies, typed h1 selectors; kinds.mjs repair/credits off, fixture name = seed name; browser 323/0, kinds 32/0mre
  • 20e09d89Merge t18 (tracker#18 delta sync) into main (mission 070): conflicts README/STATUS/show.hl/project.hl/browser.mjs, both sides kept; pageShowOf summary = summaryOfmre
  • f83571c3tracker#18 (mission 067): daily sync by change lists — TMDB /tv|movie/changes (since the stored day, paged) + TVmaze /updates/shows → only our changed titles (followed: full step, unfollowed: light step — changed seasons, no TVmaze), full walk on first run / gap > 14 days / failed list; show record refreshed (title, tmdbSummary, tagline, status, genres …; renamed titles re-indexed); summary = the creator's own text (page: summary > tmdbSummary > tvmazeSummary), one-time clear of copied summaries (9,647 on the live copy); gate 261, tests/realdata-018*.mjs, README + STATUSmre
  • 1ed5457etracker#20 + #21 (mission 068): typed headings "<Type> | <name>" in type colours; TV titles split into Series (/series) and Shows (/shows) by TMDB type + Reality/Talk/News genres — kind stored by sync/import/adult backfill + new kind backfill (resumes), /movies/<slug>, /shows/<slug> of a series/movie → 301, /my/series + /my/shows, home 5 tiles + 3 rows, search/filmography labels; gates kinds 32 + browser 266, tests/realdata-068.mjs, tools/count-kinds.hl, docs/kinds.md, README + STATUSmre
  • f2b00674Merge t26 (tracker#26 + #28) into main (mission 062): short ids for every new person (castPersonId, guest route), guest stars stored on the title and created as people only when opened (/person/tmdb/<id>?show=<id> → 302), lean watch/follow clicks (showRow a small object, cast/crew from the slug, watches cached per user, face rows only after a season toggle); gate 311, tests/realdata-062.mjs, README + STATUSmre
  • 0553b51ftracker#19 (mission 066): franchises and timelines — tables, /franchises, /franchises/<slug>, /timelines/<slug> (Timeline | Release sort, series by last episode), the Prequel | Timeline | Sequel widget with the franchise above, the creator's editor, TMDB collection seed in the app (resumes, paced); gate tests/franchises.mjs 48/0 + browser.mjs 266/0, tests/realdata-066.mjs, docs/franchises.md, README + STATUSmre
  • fa1f9dfatracker#29 (mission 063): unwatched check muted grey outline + check (accent only on hover), watched stays solid — no code regression, the accent outline read as ticked; gate checks real checks visibly (computed style + screenshot pixel) on /my/unwatched, show, movie, /my/movies; gate 266, tests/realdata-063.mjs, README + STATUSmre
  • 10bb3f93tracker#28 (mission 061): full cast (all seasons, main cast by episodes, guest stars) + crew (created by, directed by, written by, screenplay, story, music) — stored by the details completion, the daily sync, the search import (one details request) and a background credits job (resumes, RSS limit); show page collapsed after 20 with client-side Show all; showBySlug via a slug map; gate 249, tests/realdata-028.mjs, README + STATUSmre
  • d8b12d67tracker#27 (mission 060): short ids for movies, series and persons — old 702 kept (data/old-short-ids.json), new random [a-z0-9]{5} unique across both, claimed at creation, background backfill (resumes), shown under poster/photo, /<shortId> → 301; gate 259, tests/realdata-060*, README + STATUSmre
  • 25a50bc4tracker#26 (mission 059): titles from a filmography are completed — on open (skeleton, step-wise face showComplete, no reload) and by the in-app details repair (resumes, TMDB-paced, series in parts); cast from TMDB credits; gate 231, tests/realdata-026.mjs, README + STATUSmre
  • f14db671tracker#22-#25 (mission 058): episode air dates, season check = all episodes watched, movie watched check (+ /my/movies count), /genres/<genre> pages (movies + series, newest first, paginated); gate 238, tests/realdata-058.mjs, README + STATUSmre
  • 1704ec45tracker#17 (mission 057): season caret down/up, skeleton rows while a season loads, sessionless showSeasonEpisodes face (no page re-mount), client-only close; gate 214, tests/realdata-057.mjs, README + STATUSmre
  • f2fe3e36mission 056: README + STATUS (merge, fixes, Hybriel 8590df63, real-data check), tests/realdata-056.mjs, tools/check-public-slugs.hlmre
  • f40c250emission 056: re-vendor hybriel master 8590df63 (#121, #122); an adult title's page is Not found for non-followers; gate: leave the page before stopping the servermre
  • 2b7fdd6cmission 056: signed-out header one row on phones ("Log in", nowrap), backfill skips adult titles' posters, gate checksmre
  • 2c53d5efMerge branch 't16-person' (tracker#16 person pages) into main; filmography shows only public titles (054 adult flag), gate race fix (backfill start line)mre
  • c171227emission 054: hide adult/unknown titles from the public lists and the search; in-app adult-flag backfill (TMDB details + poster per title, resumes), gate + real-data proofmre