Group with parenthesis () does not return results in source.yml
With the following test template in source.yml
- name: ENTERTAINMENT
value: >-
(Name ~ "^XYZ.*$")
All XYZ with normal group names are found, but when they are in a group for example "Entertainment (ABC)" they are not found, however can confirm they are found in the web gui when something like "^XYZ$" is used as a regex
I can also search for the group ok with an escaped regex in the web gui "^ENTERTAINMENT \(ABC\)"
@jamesbrown i dotn uderstand your question, What do you want to filter ? If you want to filter by group name
you should use Group ~ <pattern>. If you filter by name, this is different. It filters the channel name, not the group.
And dont forget, channels can have different Title and Name.
Can you give me an example of the channel name and the group name you want to filter with the pattern you are using?
@jamesarbrown is this issue open or is it solved ?
Sorry @euzu for not responding, been very busy.
If there is a group on the provider called let us say "Entertainment (UK)" and "Entertainment (USA)" the contents are not being searched as far as I can tell and hence a rough example like this... (example from memory, so hopefully have shown a valid search pattern)
- name: Test1
value: >-
(Name ~ "*BBC*")
returns no channels from those groups, even though there are probably 20 entries that match.
The web front end does return results, but the actual backend does not
@jamesarbrown the regular expression should be .*BBC.*
Ok i have tested it whit this playlist:
#EXTM3U
#EXTINF:-1 tvg-id="1" tvg-name="Entertainment (USA)" group-title="Entertainment",Entertainment (USA)
http://localhost:7000/jb/secret/1
#EXTINF:-1 tvg-id="2" tvg-name="Entertainment (UK)" group-title="Entertainment",Entertainment (UK)
http://localhost:7000/jb/secret/2
#EXTINF:-1 tvg-id="3" tvg-name="Entertainment (BBC)" group-title="Entertainment",Entertainment (BBC)
http://localhost:7000/jb/secret/3
#EXTINF:-1 tvg-id="4" tvg-name="Entertainment (FR)" group-title="Entertainment",Entertainment (FR)
http://localhost:7000/jb/secret/4
#EXTINF:-1 tvg-id="5" tvg-name="Entertainment" group-title="Entertainment",Entertainment
http://localhost:7000/jb/secret/5
source.yml
sources:
- inputs:
- name: pl1
type: m3u
url: 'http://localhost:7000/entertainment.m3u'
headers:
User-Agent: "Mozilla/5.0 (Linux; Tizen 2.3) AppleWebKit/538.1 (KHTML, like Gecko)Version/2.3 TV Safari/538.1"
targets:
- name: entertain
options:
ignore_logo: true
output:
- type: m3u
filename: pl1.m3u
sort:
order: asc
filter: '(Name ~ ".*BBC.*")'
mapping:
- bbc
mapping.yml
mappings:
templates:
- name: bbc
value: 'Name ~ ".*BBC.*"'
mapping:
- id: bbc
mapper:
- pattern: '!bbc!'
attributes:
name: It's BBC
And the result is:
#EXTM3U
#EXTINF:-1 tvg-id="3" tvg-name="It's BBC" group-title="Entertainment",Entertainment (BBC)
http://localhost:7000/jb/secret/3
As expected.
Did i understand your question wrong ?
@euzu I am heading out to Saudi end of next week working for a couple of weeks, if you can leave this open for say 6 weeks, I will update my install and retest as I think i was only getting channels .*BBC.* from "UK Regionals" and not the group "Entertainment (UK)".. but clearly your example is working.
@jamesarbrown all the best with your work abroad!
@jamesarbrown any progress on this topic ?
closed due to inactivity