ForceGT / Tata-Sky-IPTV

Generate direct m3u playlist for all the channels subscribed in the Tata Sky portal
661 stars 130 forks source link

Explicitly specify inputstreamaddon and manifest type=mpd while generating the playlist #22

Closed anishsane closed 2 years ago

anishsane commented 2 years ago

By default, kodi is unable to interpret the mpd format. With these, kodi is able to interpret the mpd format and is also sending the requests to license_key url.

However, afterwards, the license_key url is giving a different error, as described here: https://github.com/xbmc/inputstream.adaptive/issues/378 I have not gotten past this point.

barelycodes commented 2 years ago

A fix has been implemented for Kodi Nexus https://github.com/xbmc/inputstream.adaptive/pull/716.

anishsane commented 2 years ago

A fix has been implemented for Kodi Nexus xbmc/inputstream.adaptive#716.

I am not sure if that fix solves my issue. It only specifies the better defaults when | is not mentioned in license_url. I got around that issue by explicitly specifying the payload and headers.

However, for me, the issue (after the above PR) is: The license server rejects the challenge with the "Invalid license challenge." message. TBH, I don't know what that means.

barelycodes commented 2 years ago

Use Kodi v20 nightly builds without modifying the script. The change I mentioned won't be implemented in v19. You should have posted this in issues instead of pull request. The "invalid license challenge" might be the server rejecting because of insufficient details. Or if you want to use v19, append "|Content-Type=application%2Foctet-stream|R{SSM}|" at the end of license url.

ForceGT commented 2 years ago

I agree with @barelycodes says, I have faced this "Invalid License Challenge" stuff many times when I was trying to test this on Kodi. Basically to summarize, to get the license from the server, we need to put something called a license challenge which is basically some binary data and that is what Kodi puts in by default and Tata Sky server doesn't accept that for some reason. That's why I moved to Tivimate which relies on ExoPlayer and Tata Sky's default Android app relies on that too.

But as a matter of fact, many people in the discussion group have reported that Kodi V20 works very well with the m3u file generated by the script and it takes time to switch between different channels because Kodi cannot close the streams quickly and TataSky doesn't grant license to more than 2 requests for the same account at a time

anishsane commented 2 years ago

Yes. TIVImate app works.

We would have to refresh the playlist periodically. In kodi, we can work-around this problem my dynamically generating an entry within kodi plugin itself. e.g. https://github.com/botallen/plugin.video.jiotv/blob/main/resources/lib/main.py#L293-L302 With this, the PVR addon will not need to refresh playlist.

Secondly, with kodi, I can directly launch the selected channel without having to go via the menus. Kodi can handle channel groups better and has a good support for remote.

So, for now, I am using the TIVImate app. But it would be great if kodi works.

On a separate note: I also tried "Native MPEG-Dash + HLS Playback" addon in firefox and it works too. So, I am wondering, how does it generate the license challenge that tatasky server accepts? I converted both the strings to curl and tried. The one generated by kodi fails. The one generated by firefox addon gives a reasonable data.

barelycodes commented 2 years ago

Does the curl from Kodi and the "Native MPEG-Dash + HLS Playback" addon contain any data in Postfields? If one of them doesn't, well, you have your answer.

ForceGT commented 2 years ago

You can move the discussion to the Telegram group, I'm closing this as it is not relevant anymore