xiaodoudou / PlexIPTV

This app simulate a DVR device for Plex by providing a layer to any IPTV provider (that provide a m3u8 playlist)
Apache License 2.0
193 stars 24 forks source link

Name with Periods #9

Closed 12nick12 closed 6 years ago

12nick12 commented 6 years ago

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 commented 6 years ago

Hey mate,

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

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

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

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 commented 6 years ago

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 commented 6 years ago

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 commented 6 years ago

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 commented 6 years ago

So just do :

 {
      "name": "AMC HD",
      "channel": "254"
    }
12nick12 commented 6 years ago

The issue is sometimes the names change, but the schedules direct never changes.

On May 14, 2018 12:25 PM, "xiaodoudou" notifications@github.com wrote:

So just do :

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

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/xiaodoudou/PlexIPTV/issues/9#issuecomment-388878108, or mute the thread https://github.com/notifications/unsubscribe-auth/AQ-gRSnQkR5QVI-f0R0imzpGvzR0wBM3ks5tya_rgaJpZM4T9nnk .

xiaodoudou commented 6 years ago

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

xiaodoudou commented 6 years ago

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 commented 6 years ago

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"
    }