Skip to content

Matching

Julien Hoffmann edited this page May 18, 2026 · 1 revision

Matching

watchlist2dvr uses a deterministic title-matching pipeline. The goal is to avoid guessing and make match behavior predictable.

Normalization

Titles are normalized in this order:

  1. Strip trailing year suffixes such as Foo (2025).
  2. Strip edition markers such as Extended Edition or Director's Cut.
  3. Lowercase the title.
  4. Normalize umlauts such as ä -> ae.
  5. Strip leading articles such as the, a, an, der, die, and das.
  6. Remove diacritical marks.
  7. Remove punctuation.
  8. Collapse whitespace.

Matching flow

  1. Pre-normalize EPG events once.
  2. Try an exact match on the preferred language title.
  3. Try exact matches on fallback languages in order.
  4. Filter candidates by year, if year data exists.
  5. Pick the earliest airing if more than one candidate remains.
  6. 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.

Why TMDB is used

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.

Useful settings

  • preferred_language picks the main title language.
  • fallback_languages adds alternate languages in order.
  • strict_year_match makes year handling stricter when EPG data is incomplete.
  • year_tolerance sets the acceptable year delta.
  • fuzzy_enabled should stay off unless you need it.

Clone this wiki locally