palinek / pvr.sledovanitv.cz

Kodi's sledovanitv.cz client addon
GNU General Public License v2.0
30 stars 14 forks source link

Překročili jste limit současně spuštěných streamů #90

Open ExSport opened 1 year ago

ExSport commented 1 year ago

Using CoreElec 9.2.8 (latest one for my AmLogic s905 HW) with 18.9 Leila KODI, pvr plugin version 1.9.0.8. It seems this plugin behaves like it is actively streaming also in case it is not streaming and Pvr plugin loads program list only? When I start tv box with CoreElec, upon start it loads list of programs available. Unfortunately there seems to be some keep-alive API call which completely blocks streaming on another devices as there is a limit of 1 device for web/mobile device type. When CoreElec box is connected to the network, nothing is streamed on it but anyway it behaves like it is streaming actively so no other device can play tv streams until I completely disconnect CoreElec from internet. Is there any option how to avoid it? In settings there is some keep-alive settings limited to max 60 seconds but sledováníTV.cz clears the lock for actively streaming device after +-2 minutes. It means when pvr plugin is active but no streaming performed, it still blocks using different devices completely. When using official Android app or web interface for browsing programs, showing EPG etc., it doesn't block other devices from streaming but your plugin blocks it. Is there some easy fix? Thank you very much for your support!

palinek commented 1 year ago

I don't know, if we can do something reasonable here. The device must be considered "alive" by backend server to be able to check/synchronize the recordings and to load new EPG. And even if we sacrifice recordings/EPG synchronization, I'm not sure about stream URLs (if they will work in kodi, when the sledovanitv client would not be considered alive).

ExSport commented 1 year ago

Thanks for your response👍 I expect it should be doable as when native Android app or web interface browse only, show records, manage them, views EPG etc., it doesn't block anything, only started streaming does it. It seems over plugin sends some API call which is translated by backend as active streaming. Anyway thanks for your support.

palinek commented 1 year ago

I expect it should be doable as when native Android app ... browse only, show records, manage them, views EPG etc., it doesn't block anything, only started streaming does it.

Did you confirm this? As the PVR is trying to mimick the same behavior as Android app. There may have been some change in the backend + android app recently, but I'm lacking free time to dig into this right now. Sorry.

petr-zeman commented 1 year ago

I can confirm this issue. We are using this plugin on 4 devices and we constantly have this problem. I tried to discuss it with their support without telling explicit details about used platforms as they don't support it. Although none of our devices played that time any stream, according to their information we had two streams open, and they were not able to tell any details, e.g. which devices exactly should be playing such streams. They told me they can't see info about devices, although in the client UI is possible to see the list. Maybe they just don't have per-device info about played streams. At this moment service is "safely" usable only with two devices turned on (even if other devices are not playing anything). I didn't try to analyze the traffic, but my impression is, they started to use some other validation, and maybe their official apps and web GUI sends info about the "stopped" stream. But I didn't see any stop button. That time they told me they will make a manual reset and asked me to wait 15 minutes. Maybe there is some 15-minute "keep alive" telling if the stream is still played by the client. E.g. opening the stream could initiate some UDP sending and if there is no "keep alive" packet in the last 15 minutes, it will stop. Is it possible that the KODI plugin is sending some content making their backend think the stream is still played? In case of need, I can try to make some TCP dumps of the traffic on our KODI devices (LibreELEC/CoreELEC) and the web client. Not sure about the Android app (I don't have rooted devices and I don't know if it's possible in "user space").

Do you have some information on how many devices are using this plugin? Is there any chance for official support/cooperation with the IPTV provider if the number of users will be relevant for them? Is there any alternative IPTV provider with an official/supported KODI client?

And thank you very much for all the work on this project.

ExSport commented 1 year ago

On Android it is possible to use PCAPDROID with MITM plugin to decrypt TLS. No root required 🥇 https://play.google.com/store/apps/details?id=com.emanuelef.remote_capture More info on GITHUB: https://github.com/emanuele-f/PCAPdroid https://github.com/emanuele-f/PCAPdroid-mitm

ExSport commented 1 year ago

@petr-zeman Each internet provider may have different terms and conditions. I am possible to play on 1 additional device only so if any of KODI device is connected to the internet, it is impossible to play anything on any device. They differentiate PRIMARY and SECONDARY devices. Primary is SmartTV as support said to me so it is my LG TV. All secondary devices are KODI/WEB/MOBILE/Android Apps so if e.g. CoreELEC is connected, it is not possible to play video in official Android app, on ShieldTV, via WEB etc... I had to disconnect CoreELEC box to be able playing via official app or via web page but when you are out of home, it is sometimes hard to do it... 😒 The PRIMARY device is not counted in this case to the limit. It means if you don't play on SmartTV at the moment, still you are limited to 1 secondary device. PRIMARY device is always allowed to play videos so I am limited with One PRIMARY and one SECONDARY only. Their support also said that some other internet providers are able to play on two secondary devices by default...so I'm unfortunate that my provider is so limited... Btw. @palinek if you ever will find time looking into it, is it real to backport it to KODI LEIA 18.9? My HW box is locked with this version, unfortunately 😑 Thank you!

palinek commented 1 year ago

Hi, I've tried this myself and I can't confirm your findings. For me the limit is also 2 devices playing a stream at the time. But after stopping the stream on one kodi device (or original android app), after tenths of seconds I'm able to play the stream on 3rd device. Yes, there is some delay after stopping on one device to be able to stream on the next device, but it definitely isn't 15min and all 3 devices are up-and-running all the time.

is it real to backport it to KODI LEIA 18.9?

Sorry, but this is really outdated version. I can't afford to support all possible versions. But you're free to backport any changes to by yourself, this is FOSS after all.