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

Name with Periods #9

Closed
12nick12 opened this issue May 14, 2018 · 9 comments
Closed

Name with Periods #9

12nick12 opened this issue May 14, 2018 · 9 comments
Assignees
Labels
enhancement New feature or request

Comments

@12nick12
Copy link

12nick12 commented May 14, 2018

I'm trying to match channel names with Periods. The below is one of them. Would you be able to provide me with the correct regex to get this working. I've tried all of the follow and none of them work. The last one creates an error.

I254.59337.schedulesdirect.org

{
  "name": "I254.59337.schedulesdirect.org",
  "channel": "254"
},

{
  "name": "I254%2E59337%2Eschedulesdirect%2Eorg",
  "channel": "254"
},

{
  "name": "[I254.59337.schedulesdirect.org]",
  "channel": "254"
},

{
  "name": "[I254\.59337\.schedulesdirect\.org]",
  "channel": "254"
},
@xiaodoudou xiaodoudou self-assigned this May 14, 2018
@xiaodoudou xiaodoudou added the question Further information is requested label May 14, 2018
@xiaodoudou
Copy link
Owner

xiaodoudou commented May 14, 2018

Hey mate,

To test your regex you can use https://regex101.com/

I will give you two options, choose which one you like

  • I254\.59337\.schedulesdirect\.org

The reason is:
\. = escape the dot as on RegEx dot is wildcard for any character

  • I254\x2E59337\x2Eschedulesdirect\x2Eorg

This one works by following your logic on the second one \x[Hex value of the character]

Then the settings json file is expecting a string, so you will need to escape all your \ by doing \\

Which give you:

    {
      "name": "I254\\.59337\\.schedulesdirect\\.org",
      "channel": "254"
    },
    {
      "name": "I254\\x2E59337\\x2Eschedulesdirect\\x2Eorg",
      "channel": "254"
    },

Cheers,

@12nick12
Copy link
Author

I already tried double \ and that didn't work. I will try the second one now. THat doesn't work either. It always shows zero channels. If I grep the downloaded file with the term it works and pull up the data.

{
  "name": "I254\\x2E59337\\x2Eschedulesdirect\\x2Eorg",
  "channel": "254"
},

@xiaodoudou xiaodoudou reopened this May 14, 2018
@xiaodoudou
Copy link
Owner

I have setup an example on my side to double check, the result it the following:

Inside my playlist I have:

#EXTM3U
#EXTINF:-1,I254.59337.schedulesdirect.org
http://dummyurl.com/feed.ts

Inside my config file I have the following filter:

  "filter": [
    {
      "name": "I254\\x2E59337\\x2Eschedulesdirect\\x2Eorg",
      "channel": "254"
    }
  ]

Then if I go to my lineup page: ``

[{"GuideNumber":"254","GuideName":"I254.59337.schedulesdirect.org","URL":"http://172.30.20.140:12346/channel/254"}]

The name filtering is acting on the line that contain #EXTINF after the coma (it's the name given by the playlist)

Let me know if that help you,

@12nick12
Copy link
Author

This is whats in the m3u file that I can't get it to match up with.

#EXTINF:-1 catchup="default" catchup-source="http://vapi.vaders.tv/play/dvr/${start}/2436.m3u8?token=eyasdfasdfasdfasdfasdfasdfasdfasdFAwZ0RIeDQwYXh2In0=&duration=3600" catchup-days=5 tvg-name="AMC HD" tvg-id="I254.59337.schedulesdirect.org" tvg-logo="http://vod6.vaders.tv:8080/logos/usa%20amc%20hd.png" group-title="United States",AMC HD
http://vapi.vaders.tv/play/2436.m3u8?token=easdfasfasdfwretqwertwqerqwerf

@xiaodoudou
Copy link
Owner

So just do :

 {
      "name": "AMC HD",
      "channel": "254"
    }

@12nick12
Copy link
Author

12nick12 commented May 14, 2018 via email

@xiaodoudou
Copy link
Owner

I will create you an additional filter tmrw to filter on meta.

@xiaodoudou
Copy link
Owner

Vaders IPTV provider looks very popular but google shows multiple website for it; I'm curious what is the one where you did subscribe?

@xiaodoudou xiaodoudou added enhancement New feature or request and removed question Further information is requested labels May 14, 2018
@xiaodoudou
Copy link
Owner

1.0.4 has now that feature.

Name and meta are acting as a AND; so if both are provided the both need to be as a true statement.
In your case, you can just use meta attribute without the name attribute.

Here examples:

    {
      "name": "^AMC$",
      "meta": "I254\\.59337\\.schedulesdirect\\.org",
      "channel": "2"
    },
    {
      "meta": "I254\\.59337\\.schedulesdirect\\.org",
      "rename": "AMC",
      "channel": "3"
    }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants