kodi-pvr / pvr.iptvsimple

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

Add setting to delay initial load or retry logic? #822

Closed matthuisman closed 8 months ago

matthuisman commented 9 months ago

I'd like to use http:// playlist url pointing to a url that is started by a service addon.

Currently PVR Simple will try to call the http://127.0.0.1:[port]/playlist.m3u8 too quickly and the service add-on has not yet started the server.

If there was a way to delay or have IPTV Simple retry urls - the above would work.

Issue i'm trying to solve is if someone has kodi closed for a long time and then open it - I want to re-scrape the playlist / epg and return the new data. Otherwise they need to wait 10mins for it

phunkyfish commented 9 months ago

There is actually a facility for this in kodi pvr for a connection manager, which as an example if the M3U url was not available it would wait and keep retrying until it was available. I never bothered implementing it in iptvsimple as there is no real backend server, just a file.

matthuisman commented 9 months ago

possible to implement it without too much hassle?

CrAcK75 commented 9 months ago

I think a retry routine could be usefull also to solve another issue such as a temporary stream break from a server. A retry I think could restart the playback.

phunkyfish commented 9 months ago

I think a retry routine could be usefull also to solve another issue such as a temporary stream break from a server. A retry I think could restart the playback.

Nope, this gets requested a lot but is not possible, it’s a completely different request. Let’s keep this issue on the requested topic please.

phunkyfish commented 9 months ago

possible to implement it without too much hassle?

Hmmm, short answer is I don’t know. The feature is complicated enough, but if we only use it on start maybe we can implement it simply.

matthuisman commented 9 months ago

right. even the setting to make it sleep when starting before fetching the playlist would work

phunkyfish commented 9 months ago

Let just implement this properly, rather than going with a hack. We have enough settings already.

phunkyfish commented 9 months ago

@matthuisman here you go: https://github.com/kodi-pvr/pvr.iptvsimple/pull/823

Testbuilds: https://jenkins.kodi.tv/blue/organizations/jenkins/kodi-pvr%2Fpvr.iptvsimple/detail/PR-823/1/artifacts

matthuisman commented 9 months ago

Amazing. thank you. ill test tonight :)

matthuisman commented 9 months ago

works pretty well. have left a few comments on the PR files :)

phunkyfish commented 8 months ago

Closed by https://github.com/kodi-pvr/pvr.iptvsimple/pull/823