Files

66 lines
2.0 KiB
YAML
Raw Permalink Normal View History

2023-01-12 15:59:40 +01:00
mappings:
templates:
2025-05-26 14:39:03 +02:00
- name: bbc
value: 'Title ~ "^BBC"'
- name: documentary
value: '(Group ~ "(Documentary|Outdoor)")'
- name: entertainment
value: 'Group ~ "Entertainment"'
- name: pluto_tv
value: '(Caption ~ "Pluto TV") AND NOT(Caption ~ "Sports")'
- name: business
value: 'Group ~ "Business"'
mapping:
2025-05-26 14:39:03 +02:00
- id: iptv-org
match_as_ascii: true
mapper:
2025-05-26 14:39:03 +02:00
- filter: "!bbc!"
script: |
@Group = "BBC"
- filter: "!documentary!"
script: |
@Group = "Documentary"
- filter: "!entertainment!"
script: |
@Group = "Entertainment"
- filter: "!pluto_tv!"
script: |
@Group = "Pluto TV"
- filter: "!business!"
script: |
@Group = "News"
2025-06-07 10:11:19 +02:00
- filter: 'Input ~ "iptv-org"'
2025-05-27 12:42:11 +02:00
script: |
@Caption = concat(@Caption, " (iptv-org)")
2026-07-22 14:31:19 +02:00
# stage: after_epg runs once EPG channel IDs and logos are enriched.
# Uncomment to mirror the EPG channel id onto the channel name (sample only).
# - id: epg-name-sync
# stage: after_epg
# mapper:
# - filter: 'Name ~ ".*"'
# script: |
# epg = @epg_channel_id ~ "(.+)"
# match {
# epg => @Name = epg.1
# }
2026-10-30 22:23:08 +01:00
# A mapper rule may be written in Rhai instead of the mapper DSL: set `type: rhai`.
# `filter` is shared by both kinds; existing rules without `type` keep running as the DSL.
# - id: rhai-sample
# mapper:
# - name: tag sports channels
# filter: 'Group ~ ".*Sports.*"'
# type: rhai
# script: |
# if item.name.contains("Live") {
# item.group = "Live Sports HD";
# }
#
# let year = ctx.regex(item.title, "(?P<year>\\d{4})");
# if !year.is_empty() {
# item.group = "Movies " + year["year"];
# ctx.favourite(item, "By year");
# }