Matching Strategies
Every rule has a strategy that determines how FunkArr extracts season/episode information from a Mediathek entry. Choosing the right strategy depends on how the show's titles are structured.
Choosing a Strategy
| Strategy | Use when... | Example shows |
|---|---|---|
seasonAndEpisodeNumber | Titles contain season and episode numbers, even in non-standard formats | Shows with "Staffel 3 Folge 12" or "S03E12" in the title |
byAbsoluteEpisodeNumber | Episodes use a single running number with no seasons | Schloss Einstein (1000+ episodes), daily soaps |
itemTitleExact | Episode titles are unique and must match exactly | Anthology series with distinct titles per episode |
itemTitleIncludes | Episode titles are embedded in a longer string | Tatort ("Tatort: Borowski und die Kinder") |
itemTitleEqualsAirdate | Episodes are identified by their broadcast date | heute-show, Die Sendung mit der Maus, talk shows |
seasonAndEpisodeNumber
Extracts a season and episode number from the Mediathek title using regex patterns.
When to use: The title contains season and episode information in any format - German ("Staffel 3 Folge 12"), abbreviated ("S03/E12"), or embedded in parentheses.
Required fields:
episodeRegex- pattern to extract the episode numberseasonRegex(optional) - pattern to extract the season number; if omitted, only an episode number is extractedcaptureGroup(optional) - which capture group to use; applies to both regexes (default: the last capture group of the pattern)
Example:
For a show where titles look like "Feuer und Flamme (S03/E05)":
{
"id": "regex-se",
"priority": 0,
"strategy": "seasonAndEpisodeNumber",
"seasonRegex": "S(\\d{2})",
"episodeRegex": "E(\\d{2})",
"filters": {
"all": [
{ "field": "duration", "op": "greaterThan", "value": "20" }
]
}
}The seasonRegex captures 03 from "S03", and the episodeRegex captures 05 from "E05".
TIP
The regex should contain a capture group (). Without captureGroup, FunkArr extracts the content of the last capture group in the pattern (the full match if there is no group). Use captureGroup to select a specific group (0 = full match). If the regex doesn't match or the group is empty, the rule fails. All regexes have a 100 ms timeout.
byAbsoluteEpisodeNumber
Extracts a single absolute episode number with no season. Sonarr maps it to the correct season internally using its episode guide.
When to use: Long-running shows that use a single running episode counter. Common for German children's shows and daily series.
Required fields:
episodeRegex- pattern to extract the episode numbercaptureGroup(optional) - default: the last capture group of the pattern
Example: Schloss Einstein
Mediathek titles: "Schloss Einstein (1042)", "Schloss Einstein (Folge 1043)"
{
"id": "absolute-episode",
"priority": 0,
"filters": {
"all": [
{ "field": "duration", "op": "greaterThan", "value": "15" }
]
},
"strategy": "byAbsoluteEpisodeNumber",
"episodeRegex": "\\((\\d{3,5})\\)"
}The regex \((\d{3,5})\) matches a 3-to-5-digit number inside parentheses and extracts it. For "Schloss Einstein (1042)", the extracted episode number is 1042.
A second rule with lower priority handles the "Folge" variant:
{
"id": "absolute-episode-p1",
"priority": 1,
"strategy": "byAbsoluteEpisodeNumber",
"episodeRegex": "\\(Folge (\\d{3,5})\\)"
}itemTitleExact
Constructs a title string from parts and matches it exactly against the Mediathek title (case-insensitive). The constructed title must equal the full Mediathek title. It is then used as the episode title for matching in Sonarr/Radarr and for metadata enrichment.
When to use: Episode titles are unique and predictable. The Mediathek title contains the episode title verbatim or can be extracted cleanly.
Required fields:
titleRules- array of title parts (static text and/or regex extractions)
Example:
For a show where the Mediathek title is exactly the episode title:
{
"id": "title-exact",
"priority": 0,
"strategy": "itemTitleExact",
"titleRules": [
{ "type": "regex", "field": "title", "pattern": "^(.+)$" }
]
}itemTitleIncludes
Constructs a title string from parts and checks if the Mediathek title contains it as a substring (case-insensitive, umlauts are normalized: ä = ae, ö = oe, ü = ue, ß = ss). More forgiving than exact matching.
When to use: Episode titles are embedded in the Mediathek title with extra formatting, or when exact matching is too brittle.
Required fields:
titleRules- array of title parts
Example: Tatort
Mediathek titles: "Tatort: Borowski und die Kinder", "Tatort: Der letzte Schrei"
{
"id": "title-includes",
"priority": 0,
"filters": {
"all": [
{ "field": "duration", "op": "greaterThan", "value": "35" }
]
},
"strategy": "itemTitleIncludes",
"titleRules": [
{
"type": "regex",
"field": "title",
"pattern": "(?<=Tatort:\\s*)\\S.*"
}
]
}How it works:
- The regex part extracts everything after "Tatort: " from the Mediathek title
- Result:
"Borowski und die Kinder" - The Mediathek title "Tatort: Borowski und die Kinder" contains this string, so the rule matches
- The constructed title is then used as the episode title for matching in Sonarr
The Tatort ruleset includes a second rule at priority 1 with a more lenient regex for edge cases where the title format varies.
Example: Movie matching (Apocalypse Now)
{
"id": "title-match",
"priority": 0,
"filters": {
"all": [
{ "field": "topic", "op": "contains", "value": "Spielfilm" }
]
},
"strategy": "itemTitleIncludes",
"titleRules": [
{ "type": "static", "value": "Apocalypse Now" }
]
}This matches any entry in the "Spielfilm" topic that contains "Apocalypse Now" in its title.
itemTitleEqualsAirdate
Extracts a broadcast date from the Mediathek title. Used for shows identified by their air date rather than season/episode numbers.
When to use: Talk shows, news programs, weekly magazines, and daily shows where episodes are identified by broadcast date.
Required fields: none. The date is detected automatically from the title; titleRules, seasonRegex, episodeRegex, and captureGroup are ignored by this strategy.
Recognized date formats:
- numeric:
15.09.2026,5.9.26(two-digit years are interpreted as 20xx) - written out:
13. September 2026
The date is passed on as yyyy-MM-dd. If no date is found in the title, the rule fails. Use filters to restrict the rule to matching entries.
Example: heute-show
Mediathek titles: "heute-show vom 13. September 2026"
{
"id": "airdate",
"priority": 0,
"filters": {
"all": [
{ "field": "duration", "op": "greaterThan", "value": "25" }
]
},
"strategy": "itemTitleEqualsAirdate"
}FunkArr detects "13. September 2026" in the title, parses it into a date and matches it to the episode with that air date in Sonarr.
Example: Die Sendung mit der Maus
Mediathek titles use a numeric date format: "Die Sendung mit der Maus 15.09.2026"
{
"id": "airdate",
"priority": 0,
"filters": {
"all": [
{ "field": "duration", "op": "greaterThan", "value": "21" }
]
},
"strategy": "itemTitleEqualsAirdate"
}TIP
For airdate-matched shows, set the Series Type to Daily in Sonarr. Without this, Sonarr won't look up episodes by date.
Title Construction Deep-Dive
Title rules (titleRules) build a string by appending parts left to right. Each part is either:
- Static - appends literal text
- Regex - runs a regex against a Mediathek field and appends the match
Evaluation order
Part 1 Part 2 Part 3
[static] → [regex] → [static] → final title
"Folge: " "Borowski" "!" "Folge: Borowski!"Regex parts
A regex part has three components:
field- which Mediathek field to search (usuallytitle)pattern- the regex to runcaptureGroup- which group to extract (default: the last capture group of the pattern, or the full match if there is no group;0= always the full match)
If the regex doesn't match or the result is empty, the entire rule fails identification. If field is omitted, title is used; regex parts can use title, topic, channel, and description as field.
Multiple rules for robustness
Real-world Mediathek titles vary. A common pattern is to define multiple rules at increasing priority levels - the first handles the standard case, and fallback rules handle edge cases:
"rules": [
{
"id": "main",
"priority": 0,
"strategy": "itemTitleIncludes",
"titleRules": [{ "type": "regex", "field": "title", "pattern": "strict-pattern" }]
},
{
"id": "fallback",
"priority": 1,
"strategy": "itemTitleIncludes",
"titleRules": [{ "type": "regex", "field": "title", "pattern": "lenient-pattern" }]
}
]Priority 0 is tried first. If it fails (regex doesn't match or filter rejects the candidate), priority 1 gets a chance.