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

Filter and default channel number #21

Open calistouk opened 6 years ago

calistouk commented 6 years ago

If i set the config file to no filters and "removeIfNotFoundOnFilter": false then i get all the channels in my m3u8 file with them auto channel number starting at 80000 (around 30000 of them) what im trying to work out is how to use the filter function such that i can filter for channels that start UK or USA or CA and have them auto number from eg 80000

I tried a filter of name=UK which returned the right number but said channel undefined

If i try any channel number in the filter it picks up the last match on the filter and gives it that channel only in Plex.

Thanks

konsumer commented 5 years ago

I have same issue with filter of US:. I get a single undefined channel. large channel-lists makes plex error (I think it has an issue with >300 channels) so I am thinking of writing a script to download the M3U and generate a filter array for PlexIPTV. Do the channel-numbers matter, or can I just put them in the order of the regexes I match?

something like this:

node filter.js http://[YOURS].tv:8080/get.php?username=[USERNAME]&password=[PASSWORD]&type=m3u_plus&output=ts '^US'

Generates a bunch of these:

[
  {
    "name": "US: CBS 47 \(Jacksonville FL\) \| HD",
    "channel": 1
  }
]

Does this make sense? WIll this work ok with EPGs? Should we add a "use all the matches as any available numbers if channel isn't set" for filter, so this is built in? If this idea works ok, I'd be happy to add a PR.

konsumer commented 5 years ago

Here is the current script I have. I will tune it and test further.