github Will-Luck/iplayer-arr v1.0.2

8 hours ago

Fixed

BBC shows whose iPlayer subtitle uses the "Series N: Episode M" form (Little Britain, Cunk on Britain, and any other show that doesn't number episodes as "M. Title") now reach Sonarr correctly. Reported by @mark-130 in #13. Two layered issues prevented Sonarr from ever seeing these shows cleanly:

  • The episode-number regex in parseSubtitleNumbers was anchored to the numbered-list layout ^(\d+)\.\s* and silently failed on the named layout. EpisodeNum stayed at 0 and the Newznab tvsearch filter rejected every release. Sonarr fell back to a non-filtered code path and the file landed on disk without S01E01 in the name.
  • Once fix #1 was in, BBC IBL's relevance-ranked search exposed a second issue: a query like little britain returns ~24 programmes whose titles merely contain "Britain" (Cunk on Britain, Drugs Map of Britain, A History of Ancient Britain, Inside Britain's National Parks, A History of Britain by Simon Schama, Glow Up: Britain's Next Make-Up Star, ...). iplayer-arr was expanding every one of those into episodes and matching them against Sonarr's S/E filter, flooding the manual search UI with false positives.

What changed

  • internal/bbc/ibl.go: reEpisodeNum now matches both layouts via (?i)(?:^|(?:Episode|Pennod)\s+)(\d+). Welsh Pennod added for parity with the existing Cyfres series alias. The numbered-list form ("1. Pilot", "12. Christmas Special") still works unchanged.
  • internal/newznab/search.go: writeResultsRSS gains a filterName parameter, populated from Sonarr's q= or the resolved tvdbid lookup, applied as a case-insensitive equality check on the BBC programme title. handleSearch and handleTVSearch capture the resolved name before the BBC fallback so wildcard browse mode (no q, no tvdbid) is exempt and the iplayer-arr web UI still lists every show.

Tests

+3 new tests bringing the suite from 109 to 112:

  • bbc/ibl_test.go::TestParseSubtitleNumbers — 12 cases covering both subtitle layouts, Welsh, mixed case, multi-digit episodes, and edge cases (unnumbered, no series part).
  • newznab/handler_test.go::TestHandleTVSearchFiltersOtherShowsByName — payload of four "Britain" shows; only Little Britain releases survive the filter.
  • newznab/handler_test.go::TestHandleSearchBrowseHasNoNameFilter — verifies wildcard browse mode is exempt so the iplayer-arr web UI still lists every show.

Verified end-to-end

Live container against the real BBC iPlayer feed:

  • tvdbid=72135&season=1&ep=1 (Little Britain S01E01) previously returned only Drugs.Map.of.Britain.S01E01.... Now returns three Little.Britain.S01E01.Series.1.Episode.1.{1080p,720p,540p}.WEB-DL.AAC.H264-iParr quality variants and nothing else.
  • Sonarr's interactive search UI for Little Britain S01E01: previously showed ~25 unrelated "Britain" rows, now shows exactly 3 (one per quality). Confirmed in production.
  • v1.0.1 daily-series fix (EastEnders date-based titles) still produces EastEnders.2026.03.30.1080p... for season=2026&ep=03/30 queries. No regression.

Bonus: fix #1 also unblocks Cunk on Britain and any other BBC show using the "Series N: Episode M" subtitle layout. Fix #2 cleans up every tvsearch query, not just Little Britain, so any show that shares a word with another BBC programme will no longer cross-pollute Sonarr's manual search UI.

Container images

docker pull ghcr.io/will-luck/iplayer-arr:1.0.2
docker pull willluck/iplayer-arr:1.0.2

Full changelog: v1.0.1...v1.0.2

Don't miss a new iplayer-arr release

NewReleases is sending notifications on new releases.