Repository navigation
Matching
Julien Hoffmann edited this page May 18, 2026
·
1 revision
watchlist2dvr uses a deterministic title-matching pipeline. The goal is to avoid guessing and make match behavior predictable.
Titles are normalized in this order:
- Strip trailing year suffixes such as
Foo (2025). - Strip edition markers such as
Extended EditionorDirector's Cut. - Lowercase the title.
- Normalize umlauts such as
ä -> ae. - Strip leading articles such as
the,a,an,der,die, anddas. - Remove diacritical marks.
- Remove punctuation.
- Collapse whitespace.
- Pre-normalize EPG events once.
- Try an exact match on the preferred language title.
- Try exact matches on fallback languages in order.
- Filter candidates by year, if year data exists.
- Pick the earliest airing if more than one candidate remains.
- Use fuzzy matching only if
fuzzy_enabled: true.
Events shorter than 60 minutes are discarded before matching. That avoids treating short misclassified TV items as movies.
IMDb does not provide a public multilingual title API. TMDB does, so the app resolves titles through TMDB before matching against the EPG.
Typical flow:
IMDb ID -> TMDB /find/{id} -> TMDB /movie/{id}/translations -> localized titles
Both TMDB lookups are cached in Redis for 7 days.
-
preferred_languagepicks the main title language. -
fallback_languagesadds alternate languages in order. -
strict_year_matchmakes year handling stricter when EPG data is incomplete. -
year_tolerancesets the acceptable year delta. -
fuzzy_enabledshould stay off unless you need it.