legacy-arrflix/processes/subtitles/runs/american-dad.md
s8n 23520df2df processes/subtitles: v2 REST fetcher + AD S02E01-E12 subbed
Adds lib/sub-rest-fetch.py: direct OpenSubtitles REST, looks up subs by
per-episode IMDB id (e.g. tt0511631) instead of the plugin's
(parent_imdb_id, season, episode) combo path. This sidesteps shows where
library numbering diverges from OpenSubtitles' catalogued numbering --
American Dad uses Hulu S1=7 eps; OS uses Fox S1=23 eps; the plugin path
returns 0 hits past S01E07 even though every per-episode IMDB id is
correct.

Recipe README updated to surface the two paths (v1 plugin / v2 REST) and
recommend v2 by default. American Dad run log now shows 19/58 episodes
subbed (S01 7/7 via v1, S02E01-E12 via v2). S02E13-S04 (39 eps) deferred
to next 20/day quota windows.

Quirk fixed in v2: OpenSubtitles /download endpoint consistently returns
HTTP 503 to Python urllib.request despite identical headers/body via curl.
_curl() shim routes all OS API calls through curl. Each 503 still
consumes a download slot, so urllib path was unsafe to retry on.
2026-05-09 23:09:09 +01:00

5.4 KiB
Raw Blame History

Subtitle run — American Dad! (2005)

Recipe version: v1 (S01) → v2 (S02 partial) Run date: 2026-05-09 Operator: Claude Code @ onyx session, ai-lab cwd Quota usage: 20 → 1 (19 downloads: S01=7, S02=12; 2 lost to urllib-503 bug, recovered manually)

Source

Field Value
Episodes 58 (S01=7, S02=16, S03=19, S04=16)
Container mkv
Video HEVC Main10, 1440×1080, 23.98 fps, 4:3 SAR 1:1
Audio eng AAC stereo (default) + eng AC3 5.1
Embedded subs none
Existing sidecars none

Library uses Hulu/DSP season ordering (S1=7 eps). Original Fox order has S1=23 eps.

Series + library context

  • Series Id: 3b3bc999e9107f1a7643ac45d6427fee
  • Library: 767bffe4f11c93ef34b805451a696a4e (TV Shows, /media/tv)
  • Library options: SaveSubtitlesWithMedia=true, SubtitleDownloadLanguages=["eng"], RequirePerfectSubtitleMatch=false
  • Plugin: Open Subtitles v20.0.0.0, Active, creds Caveman5 valid

Outcome

Season Eps Subs fetched Quality sample Notes
S01 7 7 / 7 not yet visually verified by playback (TODO) v1 path. All from OMiCRON DVDRip release group, fps 23.976 except S01E07 (24 fps), no SDH
S02 16 12 / 16 not yet visually verified v2 path (REST). E01-E12 done. E13-E16 deferred — daily quota = 1 left, resets 23:59 UTC
S03 19 0 / 19 n/a Awaiting next quota window
S04 16 0 / 16 n/a Awaiting next quota window

Net: 19 / 58 (33 %).

Picks (S01)

Episode Sub release Author DLs FPS HI
S01E01 Pilot American.Dad.S01E01.DVDRip.XviD.REPACK-OMiCRON zetakoo_ 154 132 23.976 no
S01E02 Threat Levels American.Dad.S01E02.DVDRip.XviD.REPACK-OMiCRON (auto) 89 896 23.976 no
S01E03 Stan Knows Best American.Dad.S01E03.DVDRip.XviD.REPACK-OMiCRON (auto) 69 317 23.976 no
S01E04 Francines Flashback American.Dad.S01E04.DVDRip.XviD.REPACK-OMiCRON (auto) 72 315 23.976 no
S01E05 Roger Codger American.Dad.S01E05.DVDRip.XviD.REPACK-OMiCRON (auto) 32 309 23.976 no
S01E06 Homeland Insecurity American.Dad.S01E06.DVDRip.XviD.REPACK-OMiCRON (auto) 67 778 23.976 no
S01E07 Deacon Stan Jesus Man American.Dad.S01E07.DVDRip.XviD-OMiCRON (auto) 65 124 24 no

All chose by recipe Step 4 picker (highest DownloadCount among non-HI / non-MT / non-AI / non-Forced, prefer 23.976 fps). Picker behaved consistently — no manual override needed for S01.

Breakage

After S01 passed, S02E01 search returned 0 results. Verified:

  • ProviderIds for S02E01 in library = Imdb=tt0511631 Tvdb=306168 (correct for "Bullocks to Stan")
  • Plugin quota: 13 / 20 remaining (not exhausted)
  • Plugin log shows no error — silent zero
  • Same recipe worked 7 times in a row immediately prior — not a script bug
  • Sample-tested S02E02 / S02E08 / S02E13 → all 0 results

Root cause: library numbering is Hulu/DSP (S1=7), OpenSubtitles indexes Fox airing order (S1=23). Plugin queries OS with (parent_imdb_id, season, episode) so library S=2 E=1 maps to a Fox cell that doesn't exist on OS in that S/E slot, even though the per-episode IMDB id (tt0511631) is real and indexed on OS by Fox order as S=1 E=8.

The plugin doesn't expose per-episode-IMDB lookup, only the S/E combo path, so there's no flag we can flip to make this work.

Recipe amendments triggered

  • v1 → v2: process needs a season-numbering pre-check (Step 3), and a fallback fetch path that doesn't rely on plugin S/E mapping. See CHANGELOG.md v2 design choice between direct OS REST (recommended) and library re-numbering.

v2 picks (S02E01E12)

Episode Sub release DLs FPS HI
S02E01 Bullocks to Stan american.dad.s01e08.dvdrip.xvid-omicron 25 846 23.976 no
S02E02 A Smith in the Hand American Dad S01E09 A Smith in the Hand.DVDRip.NonHI.cc.en.20FOX 75 29.97 no
S02E03 All About Steve American Dad S01E10 All About Steve.DVDRip.NonHI.cc.en.20FOX 2 600 29.97 no
S02E04 Con Heir American Dad S01E11 Con Heir.DVDRip.NonHI.cc.en.20FOX 140 29.97 no
S02E05 Stan of Arabia 1 American Dad S01E12 Stan of Arabia Part 1.DVDRip.NonHI.cc.en.20FOX 110 29.97 no
S02E06 Stan of Arabia 2 American Dad S01E13 Stan of Arabia Part 2.DVDRip.NonHI.cc.en.20FOX 86 29.97 no
S02E07 Stannie Get Your Gun American Dad S01E14 Stannie Get Your Gun.DVDRip.NonHI.cc.en.20FOX 99 29.97 no
S02E08 Star Trek American Dad [2.15] 18 0.0 no
S02E09 Not Particularly Desperate USER-Gwives American Dad [2.16] 24 0.0 no
S02E10 Rough Trade American Dad S01E17 Rough Trade.DVDRip.NonHI.cc.en.20FOX 40 29.97 no
S02E11 Finances With Wolves American Dad [1.18] Finances with Wolves-eng 7 730 23.976 no
S02E12 It's Good to be the Queen American Dad - 1x19 - Its Good to be the Queen.en 13 228 23.976 no

Note: 8 picks are 29.97 fps. SRT timestamps are absolute time, so this should not desync on a 23.976 fps source provided NTSC durations match. Confirm via recipe Step 6 sync sample on at least one 29.97-pick episode.

Followups

  • visually verify sample S01 sub plays in sync (recipe §6)
  • visually verify sample S02 29.97-fps pick plays in sync (e.g. S02E03)
  • tomorrow: sub S02E13E16 (4 eps) + start S03 (19 eps total today + tomorrow)
  • day after: finish S03 + S04 (16 eps)