Expand description
Episode discovery, dropdown labels, the Episodes table and stem listing.
Constantsยง
- EPISODES_
TTL - How long Episodes-table rows stay memoised (
_EPISODES_TTL_S).
Staticsยง
- EP_
TAG_ ๐RE - NEW_
CAST_ ๐RE - SEQ_RE ๐
- SLUG_
TAG_ ๐RE - TAG_RE ๐
Functionsยง
- child_
dirs ๐ - Subdirectories of
dir, sorted, hidden ones skipped (glob("dir/*")). - ep_
choice _ep_choice(slug, tag): the dropdown label.- ep_meta
_ep_meta(slug, tag)โ(title, season_title)from the cast config.- episode_
choices _episode_choices().- find_
episodes _find_episodes():(slug, tag)pairs from both cast layouts, plus(slug, "")stubs for shows with a project.json and no episode yet.- is_
legacy_ cast_ name - Legacy cast file names:
cast_{slug}_{tag}.jsonin the workspace root. - is_
safe_ slug_ or_ tag _is_safe_slug_or_tag(value): a bare path component, checked before any path is built from request data.- load_
stems _load_stems(slug, tag, filter_type):[(label, path)]for the stem dropdown, sorted by file name, labelled from the parsed script.- looks_
like_ tag Truefor a raw episode tag such asS04E04.- parse_
choice _parse_choice(choice): a dropdown label back to(slug, tag). An unsafe slug yields("", "").- read_
json ๐ - refresh_
episodes _refresh_episodes(force): Episodes-table rows, memoised forEPISODES_TTLper workspace root. The staleness scan stats every stem, so rows are evaluated on up to eight threads.- str_
field ๐