summaryrefslogtreecommitdiff
path: root/CLAUDE.md
diff options
context:
space:
mode:
Diffstat (limited to 'CLAUDE.md')
-rw-r--r--CLAUDE.md29
1 files changed, 26 insertions, 3 deletions
diff --git a/CLAUDE.md b/CLAUDE.md
index ed4373d..a1a57d5 100644
--- a/CLAUDE.md
+++ b/CLAUDE.md
@@ -127,9 +127,27 @@ downloaded at once, Facebook videos are supported, the library ranks shows by th
and opt-in skipping of breaks the publisher marked `toc: false`. Nothing is guessed from
chapter titles.
-**Tier 3 skip detection — audio fingerprinting of theme music — is still not built.** Peter
-deferred it; the design plan puts it in Phase 3 and wants a desktop prototype against real
-episodes before any Android code.
+**Tier 3 skip detection — audio fingerprinting — is built, in two parts.** Both were desktop-
+prototyped against real episodes before any Android code, per the design plan's own instruction.
+
+- **Intro/outro** (`IntroOutroDetector`, `AudioCorrelation`, `MediaCodecClipSource`,
+ `FingerprintUpdater`): one fixed candidate per show per end, needing 3+ independently-fetched
+ episodes to agree before it is trusted -- the confirmation threshold exists because two episodes
+ fetched close together can agree on a segment that is a dynamically-inserted ad, not the show's
+ real intro (found prototyping against Darknet Diaries). Triggered per download via
+ `FingerprintWorker`.
+- **Midroll ad breaks** (`MidrollScanner`, `MidrollDetector`, `MidrollUpdater`): a show can have
+ several distinct midroll breaks, at a different timestamp in every episode, so this scans a
+ whole episode body rather than a fixed head/tail window -- `MidrollScanner.findSharedSegments`
+ finds every segment two episodes share, at whatever position each happens to have it, and
+ `MidrollUpdater` composes a coarse (decimated) pass with a native-resolution verify so that scan
+ is fast enough to run on a phone. Prototyping this against Darknet Diaries found a real recurring
+ segment (not the fixed intro) independently present across episodes nine years apart. Runs
+ nightly while charging (`MidrollWorker`), not per-download: a full-body scan is too expensive for
+ that, and unlike a download it never touches the network. No per-show toggle, same as
+ intro/outro -- the confirmation threshold is the safety mechanism.
+
+Neither has been verified on a device yet -- see the known-gaps list below.
**ID3 `CHAP` frames are dropped, not deferred** — decided 2026-09-26 by measuring Peter's actual
61 subscriptions rather than guessing. Every feed's newest episode was fetched far enough to read
@@ -161,6 +179,11 @@ by default and correct; it is simply waiting for a publisher who marks breaks.
- **Android Auto is unverified in a real car.** The session protocol is proven by
`MediaBrowseTest`; whether Auto's own compatibility checks pass on a head unit is untested,
and a sideloaded media app may need Auto's developer mode enabled.
+- **Neither half of Tier 3 fingerprinting has run on a device.** The decode/decimate/correlate
+ pipeline is proven against synthetic fixtures and, separately, against real downloaded episodes
+ in a throwaway desktop prototype -- never against `MediaCodecClipSource`'s actual
+ MediaExtractor/MediaCodec decode loop on real hardware, and the `MigrationTest` 7→8 case has
+ only run on the JVM-backed `MigrationTestHelper`, not an emulator or device.
## Domain notes worth keeping