tracker
All repositories: gitoria
19.2 KB
// project.hl — tracker.worldapi.org: THE MAP (mission 028, docs: README "Files"). Config, the routes and how the parts are wired;// what each feature does is in the file named here, not in this one.//// login (ident only, the header's selector + button) lib/users.hl, components/main.hl, login.js, /login/* below// the shell: header, main menu, user menu, sidebar components/main.hl (theme/shell/*, vendored from layouts.worldapi.org)// /genres · /people (the main menu) · /settings lib/catalog.hl genreList · lib/people.hl peoplePage · components/settings.hl// titles: records, slugs, kinds, list caches lib/shows.hl a title's page: components/show.hl// public lists /movies /series /shows /genres, home lib/catalog.hl// components/{movies,allseries,allshows,genre,home,tilelist}.hl// follows · watches · /my/* lib/follows.hl · lib/watches.hl// components/{myshows,mymovies,unwatched,schedule}.hl// search, web search, import lib/search.hl (+ search-helpers.hl) components/search.hl// people, a person's page and filmography fill lib/people.hl components/person.hl// cast + crew, the credits job lib/credits.hl (+ credits-helpers.hl)// a title completed from TMDB (details repair) lib/details.hl// TMDB / TVmaze requests, posters lib/tmdb.hl// the sync of one title · which titles a day lib/sync.hl (+ sync-helpers.hl) · lib/dailysync.hl// adult flag + kind backfills lib/backfill.hl// short ids (/<shortId>) lib/shortids.hl// franchises + timelines · TMDB collection seed lib/franchises.hl · lib/collections.hl// the curated franchises (data/franchises.json, #40) lib/franchiseseed.hl// components/franchise*.hl, timelineedit.hl// duplicate titles merged lib/merge.hl// the background jobs and their clocks lib/jobs.hl (one instance, made below after the server)// poster + photo files lib/images.hl// shared helpers (env, paths, dates, ids, lists) lib/util.hl// styles · design tokens · the WorldAPI theme components/styles.hl · shared/tokens.hl · theme/ (never edited here)//// Config (env; no committed secret — the first deploy registers this app in ident and sets these, done by the architect, as// with ident's own .env for SMTP): TRACKER_PORT (45008), TRACKER_URL (this app's own public address, for the return URL),// IDENT_URL (https://ident.worldapi.org), TRACKER_KEY (pk_…), TRACKER_SECRET (sk_…), TRACKER_STORAGE, TRACKER_SESSIONS,// TRACKER_WATCH, TMDB_READ_TOKEN; the jobs' switches and limits: lib/jobs.hl (README "Config").import WebFramework from 'hl:web'import { Response } from 'hl:http1'import { env } from 'hl:proc'import { now } from 'hl:time'import Styles from './components/styles.hl'import Home from './components/home.hl'import LoginFailed from './components/loginfailed.hl'import Show from './components/show.hl'import Unwatched from './components/unwatched.hl'import Schedule from './components/schedule.hl'import MyShows from './components/myshows.hl'import MyMovies from './components/mymovies.hl'import Movies from './components/movies.hl'import AllShows from './components/allshows.hl'import AllSeries from './components/allseries.hl'import Search from './components/search.hl'import Person from './components/person.hl'import Genre from './components/genre.hl'import Genres from './components/genres.hl'import People from './components/people.hl'import Settings from './components/settings.hl'import Franchises from './components/franchises.hl'import Franchise from './components/franchise.hl'import FranchiseEdit from './components/franchiseedit.hl'import TimelineEdit from './components/timelineedit.hl'import { dark, darker } from './shared/tokens.hl'import { postersDir, profilesDir } from './lib/util.hl'import { loginCallbackOf } from './lib/users.hl'import { imageResponse, isSafePosterName } from './lib/images.hl'import { ensureIndex } from './lib/search.hl'import { showsMovedPath, warmTitleCaches, warmEpisodeKeys, movedSlugs, movedPathOf, personById } from './lib/shows.hl'import { allWatchedEpisodeIds } from './lib/watches.hl'import { allFollowedShowIds } from './lib/follows.hl'import { ensureShortIds, shortIdPath } from './lib/shortids.hl'import { guestPersonId, warmPeopleView, peopleViewStats } from './lib/people.hl'import { moveCopiedSummaries } from './lib/dailysync.hl'import { ensureFranchises } from './lib/franchises.hl'import Jobs from './lib/jobs.hl'static appTitle = "tracker"// ---- THE INSTALLABLE APP (tracker.worldapi.org#10), the same way calendar.worldapi.org does it: hl:web's own web app// manifest (/__hl/manifest.webmanifest, linked from every head with the apple-touch-icon and theme-color) and service// worker (/__hl/sw.js) from these settings — no JavaScript of ours. Icons in icons/ (icon.svg is the source, the PNGs// are rendered from it with rsvg-convert, README "Icons"). The theme colour is the header's background (darker), the// splash background the page's (dark) — both off the tokens, not written out again.appThemeColor = darker.valueappBackgroundColor = dark.valueappIcons = [{ src = '/icons/icon-192.png' sizes = '192x192' purpose = 'any' }{ src = '/icons/icon-512.png' sizes = '512x512' purpose = 'any' }{ src = '/icons/icon-192.png' sizes = '192x192' purpose = 'maskable' }{ src = '/icons/icon-512.png' sizes = '512x512' purpose = 'maskable' }]appTouchIcon = '/icons/apple-touch-icon.png'appFavicon = '/icons/favicon.svg'// OFFLINE: only the shell — the header and `/` (components/main.hl says "You are offline" while the browser has no// network). The data pages are not kept: without a network they get hl:web's "Unavailable offline" page.offline = [ Home ]styles = Stylesport = env('TRACKER_PORT') != null ? toNumber(env('TRACKER_PORT')) : 45008watching = env('TRACKER_WATCH') != '0'// read by hl:web's own manifest config (WebFramework.hl `cfg.sessionDir`), not the constructor call belowsessionDir = env('TRACKER_SESSIONS') != null ? env('TRACKER_SESSIONS') : null// ---- the function routes: each checks its input, asks the topic, answers ---------------------------------------------------// /login/callback?ident_code=… (lib/users.hl): the code exchanged, this app's session signed in, back to the page (`?next=`)loginCallback = (&route, &req) => { return loginCallbackOf(server.sessions, req) }// /posters/<name>, /profiles/<name> (lib/images.hl): the file, else the placeholderposterRoute = (&route, &req) => { return imageResponse(postersDir, route.params != null ? route.params.name : null, 'poster') }profileRoute = (&route, &req) => { return imageResponse(profilesDir, route.params != null ? route.params.name : null, 'photo') }// the old addresses of the personal lists (tracker.worldapi.org#8): they all live under /my/ now — a permanent redirect so old// links keep working (architect's decision)movedTo = (&path) => { return new Response('moved to ' + path, { status = 301 headers = { 'Location' = path 'Content-Type' = 'text/plain; charset=utf-8' } }) }notFoundText = (&text) => { return new Response(text, { status = 404 headers = { 'Content-Type' = 'text/plain; charset=utf-8' } }) }unwatchedMoved = (&route, &req) => { return movedTo('/my/unwatched') }scheduleMoved = (&route, &req) => { return movedTo('/my/schedule') }// mission 058: the show page's genre pills linked `/genre/<x>` (no page there) — the genre pages are `/genres/<x>`genreMoved = (&route, &req) => {g = route.params != null ? route.params.genre : nullreturn movedTo(isSafePosterName(g) ? '/genres/' + g : '/')}// mission 060 (tracker.worldapi.org#27): `/<shortId>` → 301 to the title's or person's page (lib/shortids.hl); upper case is// read as lower case; anything else is a 404shortIdRoute = (&route, &req) => {sid = route.params != null ? route.params.sid : nullpath = sid != null && hlTypeName(sid) == 'String' ? shortIdPath(sid.toLowerCase()) : nullif (path == null) { return notFoundText('not found') }return movedTo(path)}// mission 062: a GUEST STAR's link (components/show.hl castRowsOf) — `/person/tmdb/<tmdbId>?show=<show id>` creates the person// (lib/people.hl guestPersonId) or finds the one we have, then 302 → `/person/<slug>`. A function route: the browser loads it// itself (hl:web's client router hands every non-component link to the browser)guestRoute = (&route, &req) => {t = route.params != null ? route.params.tmdb : nulltmdbId = t != null && hlTypeName(t) == 'String' && t.length <= 10 ? toNumber(t) : nullif (tmdbId == null || tmdbId < 1) { return notFoundText('not found') }q = req.query != null ? req.query : {}r = guestPersonId(tmdbId, q.show)p = r.id != null ? personById(r.id) : nullif (p == null || p.urlSegment == null) { return notFoundText('not found: ' + (r.error != null ? r.error : 'no such person')) }return new Response('see /person/' + p.urlSegment, { status = 302 headers = { 'Location' = '/person/' + p.urlSegment 'Cache-Control' = 'no-store' 'Content-Type' = 'text/plain; charset=utf-8' } })}// tracker#32 (mission 031): the header's search field sends GET /find?q=<text> (the theme's AppHeader form); a page cannot read a// query string, so this answers 302 → /search/<text> ('/', '?', '#' as spaces, like components/search.hl), no text → /searchfindRoute = (&route, &req) => {q = req.query != null && req.query.q != null && hlTypeName(req.query.q) == 'String' ? req.query.q.replaceAll('/', ' ').replaceAll('?', ' ').replaceAll('#', ' ').trim() : ''to = q != '' ? '/search/' + encodeURIComponent(q) : '/search'return new Response('see ' + to, { status = 302 headers = { 'Location' = to 'Cache-Control' = 'no-store' 'Content-Type' = 'text/plain; charset=utf-8' } })}// /shows/<slug> (tracker.worldapi.org#21, mission 068): a series or movie (or a merged duplicate's slug) answers 301 to its page// (lib/shows.hl showsMovedPath). hl:web has no way for a component route to answer a redirect, so this is a FUNCTION route, and// for a show (or an unknown slug: the page's own "Not found") it renders the title page the way hl:web renders a component// route (WebFramework.hl `on http.request`, the `component` branch): the Show component matched at /series/<slug> — same// component, same params — with the cookie's session, a new one (and its cookie) when the browser brought none. In the browser// a link to /shows/<slug> is then a full page load; every other title page stays a client-side navigation.showsRoute = (&route, &req) => {slug = route.params != null ? route.params.slug : nullto = showsMovedPath(slug)if (to != null) { return movedTo(to) }m = server.router.match('/series/' + slug)let s = req.sessionfresh = s == nullif (fresh) { s = server.sessions.mint() }let res = server.page(m, s, server.hostOf(req.headers['host']), server.requestHeaders(req.headers))if (fresh) { res.headers['Set-Cookie'] = server.sessions.cookieHeader(s.id) }return res}// tracker#31 (mission 026): the slug of a merged duplicate, or a keeper's former slug → 301 to the keeper's page (lib/shows.hl// movedSlugs, read at boot). A component route cannot redirect, so each such slug gets its own function route under /movies/ and// /series/ (/shows/ is showsRoute). A title merged while this process runs answers the keeper's page under its old slug (shows.hl// showBySlug) until the next start.slugMoved = (&route, &req) => {to = movedPathOf(req.path)if (to == null) { return notFoundText('not found') }return movedTo(to)}routes = [{ pattern = "/favicon.ico" file = "./icons/favicon.ico" headers = { 'Cache-Control' = 'no-cache' } }// the installable app (tracker.worldapi.org#10): the icons (manifest and service worker are hl:web's own, from appIcons / offline){ pattern = "/icons/icon-192.png" file = "./icons/icon-192.png" headers = { 'Cache-Control' = 'no-cache' } }{ pattern = "/icons/icon-512.png" file = "./icons/icon-512.png" headers = { 'Cache-Control' = 'no-cache' } }{ pattern = "/icons/apple-touch-icon.png" file = "./icons/apple-touch-icon.png" headers = { 'Cache-Control' = 'no-cache' } }{ pattern = "/icons/favicon.svg" file = "./icons/favicon.svg" headers = { 'Cache-Control' = 'no-cache' } }{ pattern = "/login/callback" function = loginCallback }{ pattern = "/login/failed" component = LoginFailed }{ pattern = "/login.js" file = "./login.js" headers = { 'Cache-Control' = 'no-cache' } }{ pattern = "/posters/:name" function = posterRoute }// tracker.worldapi.org#13: every movie / every series, 24 per page — the page is a PATH segment (`/movies/page/2`), a// page component cannot read `?page=` (hybriel#11) — and the movies the user follows{ pattern = "/movies" component = Movies }{ pattern = "/movies/page/:page" component = Movies }// tracker.worldapi.org#21 (mission 068): series and shows split — /series lists the series, /shows the shows; a title's page// is /movies/<slug>, /series/<slug> or /shows/<slug> (one component; /shows/<slug> is showsRoute above){ pattern = "/movies/:slug" component = Show }{ pattern = "/series" component = AllSeries }{ pattern = "/series/page/:page" component = AllSeries }{ pattern = "/series/:slug" component = Show }{ pattern = "/shows" component = AllShows }{ pattern = "/shows/page/:page" component = AllShows }{ pattern = "/shows/:slug" function = showsRoute }{ pattern = "/my/movies" component = MyMovies }{ pattern = "/my/unwatched" component = Unwatched }{ pattern = "/my/schedule" component = Schedule }// #21: /my/series and /my/shows (one component, components/myshows.hl; any other word there is its "Not found"){ pattern = "/my/:tv" component = MyShows }{ pattern = "/unwatched" function = unwatchedMoved }{ pattern = "/schedule" function = scheduleMoved }// tracker.worldapi.org#14: the search — `/search/<text>` (hl:web gives a page no query string, so not `?q=`){ pattern = "/search/:q?" component = Search }{ pattern = "/find" function = findRoute }// tracker.worldapi.org#16: a person's page (the show page's cast and the search link here) and their photo{ pattern = "/person/tmdb/:tmdb" function = guestRoute }{ pattern = "/person/:slug" component = Person }{ pattern = "/profiles/:name" function = profileRoute }// mission 058 (tracker.worldapi.org#25): a genre's movies and series, like /movies (the page in the path){ pattern = "/genres/:genre" component = Genre }{ pattern = "/genres/:genre/page/:page" component = Genre }{ pattern = "/genre/:genre" function = genreMoved }// tracker#32 (mission 031): the main menu's Genres and People, the user menu's Settings{ pattern = "/genres" component = Genres }// tracker#37 (mission 032): /people = everyone, the one updated last first, 24 per page (the page in the path, like /movies){ pattern = "/people" component = People }{ pattern = "/people/page/:page" component = People }{ pattern = "/settings" component = Settings }// tracker.worldapi.org#19 (mission 066): franchises and timelines, the creator's editor (`/franchises/edit` before the slug){ pattern = "/franchises" component = Franchises }{ pattern = "/franchises/edit" component = FranchiseEdit }{ pattern = "/franchises/:slug" component = Franchise }{ pattern = "/timelines/:tslug" component = Franchise }{ pattern = "/timelines/:slug/edit" component = TimelineEdit }{ pattern = "/" component = Home }// mission 060 (tracker.worldapi.org#27): a short id → its page (LAST: every named one-segment route above wins){ pattern = "/:sid" function = shortIdRoute }]// WHO GETS THE PUSH: the login state reaches the tabs of one session (components/main.hl trackerSignedIn/Out).tagOf = (&session) => { return session != null && session.data != null ? session.data.tag : null }audience = {trackerSignedIn = (tag, &session) => { return tag != null && tagOf(session) == tag }trackerSignedOut = (tag, &session) => { return tag != null && tagOf(session) == tag }}// cookies are per host, not per port: an own name keeps this app's session apart from// ident's own (and from any other worldapi app sharing a dev host), see ident README "Design// tokens" / hybriel#10 hybriel#17.sessionCookie = 'trackersid'// tracker.worldapi.org#14: the search index (lib/search.hl) is built once here at boot (~0.6 s on the real data), not by the// first searchsearchIndexReady = ensureIndex()// mission 060: every short id in use (one map over shows AND persons) and the records still without one, before the first requestshortIdsReady = ensureShortIds()// tracker#30 (mission 025): the slim list caches (lib/shows.hl cardOf / episodeRowsOf) of every followed title, before the first// /my/ load — not filled by that loadtitleCachesStart = now()titleCachesWarm = warmTitleCaches(allFollowedShowIds())episodeKeysWarm = warmEpisodeKeys(allWatchedEpisodeIds())console.log('list caches: ' + titleCachesWarm + ' followed titles, ' + episodeKeysWarm + ' watched episodes in ' + (now() - titleCachesStart) + ' ms')// tracker#37 (mission 032, lib/people.hl): /people's order (everyone, the one updated last first) and the photos from the titles'// casts, before the first /people load — not built by that loadpeopleViewStart = now()peopleViewWarm = warmPeopleView()console.log('people view: ' + peopleViewWarm + ' people, ' + peopleViewStats().castProfiles + ' cast photos in ' + (now() - peopleViewStart) + ' ms')// tracker#18, ONCE (lib/dailysync.hl moveCopiedSummaries): a `summary` that is only the migrated copy of tmdbSummary is MOVED to// `migratedSummary` (mission 070: kept, not shown) — the current TMDB text shows; the creator's own texts staysummariesMoved = moveCopiedSummaries()if (summariesMoved.ran) { console.log('summaries: moved ' + summariesMoved.moved + ' copies of tmdbSummary to migratedSummary, kept ' + summariesMoved.kept + ' own texts, errors ' + summariesMoved.errors + ', ' + summariesMoved.ms + ' ms') }// mission 066: which timelines every title is in (one scan of the timelines), before the first show pagefranchisesReady = ensureFranchises()// tracker#31: the moved slugs' routes first, then `routes` as written (hl:web reads the written list for the pages it serves)movedSlugList = movedSlugs()withMovedSlugs = () => {out = []for (m of movedSlugList) {out.push({ pattern = '/movies/' + m.slug function = slugMoved })out.push({ pattern = '/series/' + m.slug function = slugMoved })}for (r of routes) { out.push(r) }return out}allRoutes = withMovedSlugs()console.log('moved slugs: ' + movedSlugList.length + ' (301 to the keeper)')server = new WebFramework(routes = allRoutes, styles = styles, port = port, sessionCookie = sessionCookie, watchMode = watching)// ---- THE BACKGROUND JOBS (lib/jobs.hl): the daily TMDB sync, the backfills, the details repair, the credits job, the duplicate// merge, the short-id backfill, the collection seed, the curated franchise seed — constructing it starts their clocks and logs which ones are offjobs = new Jobs()on Error(e) { console.log('error absorbed: ' + e.message) }
Branches
- mainmain branch
Latest commits
- e5945d2fMerge t40 (tracker#40 curated franchises, Franchises menu, superseded collections) into main: deploy.sh lists all six gates (browser, kinds, franchises, pager, franchiseseed, check-theme); search.hl keeps #37's personPhotoOf + #40's importWithCredits; pager gate runs with TRACKER_FRANCHISE_SEED=0; gates 374/0, 32/0, 53/0, 229/0, 26/0, check-theme 0mre
- b638e99dMerge t38 (tracker#38 pagination, #35 Returning/Airing label) into main: LOG/STATUS keep both sides; pager gate follows #37's /people (everyone, last updated first: seed updatedAt); gates pager 229/0, browser 374/0mre
- f8ffa4dbtracker: report 032 + The Remaining + #39mre
- 7565a863tracker: LOG timemre
- b10f00c8tracker#39: double episodes — migrated episodes whose TMDB id TMDB replaced are adopted by their number in the sync (old id -> migratedTmdbId); merge.hl step 3 merges each season's doubles at start (keeper: most watches > synced > first; watches moved/parked; tombstones into mergedEpisodes, nothing deleted); tools/count-duplicate-episodes.hl; gate fixture + paths-m039; live copy 850 -> 0 in 64 s; gates 373/0, 32/0, 52/0mre
- 8f1d4542tracker#40: superseded collections — a TMDB collection timeline whose titles are all in one curated timeline is hidden (supersededBy; kept: own page + editor finder), set by the collection seed when it makes one and by the curated build (lifted when the cover is gone); partly covered ones join that franchise; no second widget (First Contact: only Star Trek — Prime); gate franchiseseed 26/0, browser 365/0, kinds 32/0, franchises 53/0, check-theme 0; real copy 24 supersededmre
- 9448d643tracker#35 follow-up (mission 033): TVmaze 'Running' is labelled 'Returning', or 'Airing' while a non-special episode of the two newest seasons is released within today +-7 days (data unchanged); gate fixtures Running/Airing/Aired + a special; browser 366/0, kinds 32/0, franchises 52/0, pager 229/0, check-theme 0mre
- 7d4b293dtracker#40: "Franchises" in the main menu (desktop header after People, phone sidebar) → /franchises, marked on franchise and timeline pages; gates 365/0, 32/0, 53/0, 24/0, check-theme 0mre
- 8751adb8tracker: report 032mre
- 9bce1f65tracker mission 032: STATUS gate files + the hour-boundary flakemre
- 718bfb89tracker#37 (mission 032): /people = everyone, last updated first (updatedAt stamped by the person fill; view built at boot, touched people first at once), photo + name tiles (person colour) with the /movies pagination, /people/<letter> removed; photo = our file, tmdbProfile, a cast/crew entry's profile (in-memory map at boot), else the new 'no photo' placeholder; new cast/crew/created_by people keep tmdbProfile; search people rows with the photo; /settings = the heading only; util.hl sortDesc starts from sorted runs (same result, 105k: 1.6 s -> 0.15 s); gates 369/0, 32/0, 52/0, check-theme 0; README/STATUS/LOGmre
- 93dfb0batracker#40 (mission 034): the curated franchises — data/franchises.json (17 franchises, 31 timelines, 285 TMDB titles, movies + series, in-universe/release order, 12 TMDB collections attached); lib/franchiseseed.hl + jobs.hl franchiseSeedTick (last start job, imports missing titles via details.hl importWithCredits = the search's Add, one per step paced, then one build; franchiseseed.db: editor changes win, the creator's same-name franchise adopted / timeline left alone, 404 remembered, resumable, idempotent); timeline heads 'N titles · in-universe order' (orderKind) and wrap on a phone; series pages show the widget; new gate tests/franchiseseed.mjs (5th in deploy.sh), the others run with TRACKER_FRANCHISE_SEED=0; gates 365/0, 32/0, 52/0, 24/0, check-theme 0; real copy 196 imported, 0 failed, 7 min, restart unchanged=31mre
- 03ec792ftracker#38 (mission 033): pagination goes exactly to the clicked page — tilelist read the clicked button's text after pagination.hl's own handler had rebuilt the buttons (real clicks only); now li.current, else the button's own text; new gate tests/pager.mjs (5 lists x 11 pages, 390/1280, real + script clicks, Back/Forward) 229/0; browser 365/0, kinds 32/0, franchises 52/0, check-theme 0mre
- 96ba683adeploy.sh: a gate without a 'passed,' line (check-theme) no longer ends the scriptmre
- eb3b9205tracker: report 031mre
- 9b5d2e89tracker mission 031: README (What it does, Test: four gates + the #32 checks, Files: theme/, new pages), STATUS (real copy, A/B load, how to repeat, open points), LOGmre
- 39950e4ctracker#32 (mission 031): the WorldAPI theme (theme/ vendored verbatim from layouts.worldapi.org 85b5654; styles.hl inherits it: accent green-dark, type colours 1-6; own base/header rules, row lines, genre-pill and inverted-button frames removed, the season foldable keeps its line; check-theme 21 -> 0, 4th deploy gate; main actions class primary) and the #32 header (theme AppHeader/MainMenu/UserMenu/Sidebar/ContentFirst: desktop brand, search, Series|Shows|Movies|Genres|People, user icon with Unwatched..Settings, Logout; signed out the ident selector, phone the iD icon dropdown; phone menu in the sidebar overlay; marked entry by :has); /find -> /search/<q>, /genres, /people(/<letter>), /settings; main { ContentFirst { slot } } works around the hl:web one-line slot bug; gates 365/0, 32/0, 52/0, check-theme 0mre
- a386dc92tracker: reports 029 + 030mre
- 71e0fd7dtracker missions 029 + 030: README (What it does, Files, gate count), STATUS (real-copy numbers, how to repeat, open points), LOGmre
- d36ea6eatracker#34 + #35 (mission 030): Follow directly under the poster, as wide as the poster (show.hl, styles.hl); the status pill next to a series' title — TVmaze's status (new tvmazeStatus, stored by the sync's TVmaze merge) else TMDB's, TVmaze Ended + TMDB Canceled = Canceled, inverted (filled, dark text, no border), green running / yellow pending / red canceled / muted ended (shows.hl statusOf); the daily delta asks TVmaze's status of an unfollowed series TVmaze's change list names (dailysync.hl syncRunStep, sync.hl syncTvmazeStatus); the status backfill after the details repair (backfill.hl, jobs.hl statusTick; resumable, 550 ms per TVmaze request); gates 354/0, 32/0, 52/0mre