Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Group with parenthesis () does not return results in source.yml #68

Open
jamesarbrown opened this issue Aug 4, 2024 · 6 comments
Open
Labels
question Further information is requested

Comments

@jamesarbrown
Copy link

jamesarbrown commented Aug 4, 2024

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\)"

@jamesarbrown jamesarbrown changed the title Group with parenthesis () is not searched in source.yml Group with parenthesis () does not return results in source.yml Aug 4, 2024
@euzu
Copy link
Owner

euzu commented Sep 3, 2024

@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?

@euzu
Copy link
Owner

euzu commented Sep 20, 2024

@jamesarbrown is this issue open or is it solved ?

@jamesarbrown
Copy link
Author

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

@euzu
Copy link
Owner

euzu commented Sep 20, 2024

@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 ?

@jamesarbrown
Copy link
Author

jamesarbrown commented Sep 20, 2024

@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.

@euzu
Copy link
Owner

euzu commented Sep 20, 2024

@jamesarbrown all the best with your work abroad!

@euzu euzu added the question Further information is requested label Sep 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants