kodi-pvr / pvr.iptvsimple

IPTV Simple client for Kodi PVR
GNU General Public License v2.0
784 stars 373 forks source link

Add another Flussonic link format #926

Open am-silex opened 4 days ago

am-silex commented 4 days ago

Hi I've got subscription for an IPTV with a bit different catchup link. Monitoring web-player, I've found out that its format is quite similar to Flussonic, but with a twist. Currently, there is no condition case for it, so I'm getting

Can't play this program

Here are link formats - both work http://server:port/ch1/**index**-1731156010-3600.m3u8?token=secret or http://server:port/ch1/**mono**-1731156010-3600.m3u8?token=secret

I propose to add this case for upstream. src -> iptvsimple -> data -> Channel.cpp -> bool Channel::GenerateFlussonicCatchupSource(const std::string& url)

        else if (fsListType == "mono")
          m_catchupSource = fsHost + "/" + fsChannelId + "/mono-{utc}-{duration}.m3u8" + fsUrlAppend;
am-silex commented 4 days ago

Locally tested, works fine

phunkyfish commented 4 days ago

You don’t say where your code should be added in the file. So it’s impossible to tell if the code is viable or not.

My guy says it is not, as it will break things for other users.

am-silex commented 4 days ago

My fault - presumed, it was obvious from my message. Created PR

am-silex commented 4 days ago

I understand, that hard-coded link format is not flexible and that it's better to allow users to modify not only appendix, but the whole link using RegEx. To do so, we have to pass all the parts to UI.

      const std::string fsHost = matches[1].str();
      const std::string fsChannelId = matches[2].str();
      const std::string fsListType = matches[3].str();
      const std::string fsStreamType = matches[4].str();
      const std::string fsUrlAppend = matches[5].str();
phunkyfish commented 3 days ago

Ok, I commented on the PR. This will require quite a bit of work to get merged if you want to do the work.