Merge Duplicates
The merge_duplicates
rule combines channels considered duplicates (e.g., "CNN HD", "CNN 4K") into one logical channel
with fallback sources.
It is similar to the remove_duplicates
rule, but instead of removing duplicates, it treats duplicates as fallback
sources when a channel is unavailable for some reason, such as upstream errors or concurrency limits for the playlist.
YAML Structure
Fields
Field | Type | Required | Description |
---|---|---|---|
patterns | []regex |
Yes | Priority order (first has highest priority) |
selector | Selector |
No | Use attribute or tag to identify groups |
final_value | FinalValue |
No | Use for modify result channels |
condition | Condition |
No | Only apply if condition matches |
Examples
Prefer the best quality:
# Input: CNN HD, CNN 4K
# Output: CNN HQ
playlist_rules:
- remove_duplicates:
patterns: ["4K", "UHD", "FHD", "HD", "SD"]
final_value:
template: "{{.BaseName}} HQ"
Restrict deduplication to specific clients: