Stream database cleared when updating playlist while there are (internet) connection issues
Describe the bug Tuliprox's database is cleared when refreshing playlist when (1) there's no internet connection or (2) an IPTV provider is unavailable (e.g. when they perform maintenance, or have other connection issues).
To Reproduce Steps to reproduce the behavior:
- Disable internet connection for Tuliprox instance
- Update playlist of an IPTV provider
Expected behavior I'd like to have Tuliprox not clear the local channel/stream database, because then clients won't be able to stream. I'd rather have Tuliprox not touch (preserve) the database.
Additional context Recently I got a HTTP error 524 (Cloudflare specific HTTP response status code) during a automatic refresh/update of my tuliprox playlist from my IPTV provider, causing the Tuliprox playlist to be cleared.
but if the provider is down wouldn't the clients not be able to stream anyways?
Yes, you're right of course, but my experience is that sometimes my IPTV provider has a temporary hiccup (maybe their servers are too busy at that moment (causing the (temporary) HTTP 524 error)). If at that unfortunate moment my Tuliprox instance performs a scheduled update of the playlist, then my clients won't be able to stream at all for at least 24 hours, because Tuliprox's automatic schedule is set to only update the playlist every 24 hours.
Yes you are right, this should not happen. But what when we have for example 3 inputs and one is not responding? We cant process the list because all the steps are applied to the complete merged raw list.
I don't know if this is possible, but maybe add a check which inputs are going to be used in a target before updating the playlist and only update those? This will also prevent unnecessary updates to inputs/playlist which don't need to be updated. Also then a check can be added to not update the playlist when there are connection issues?
for my understanding TP will remove down/providers from the end result merged playlist if they happened to be down at the time of sync. if they are back alive at the next sync, then they will be added back. @euzu can u confirm what i just said? @donflix-tv this doesn't work for u?
@aniel300 the issue is different, he says, if there is a temporary problem with the provider, for example maintenance time or network problem, then the update empties the playlist.
@donflix-tv problem is, that the next update is triggered 24 hours later, which leaves the playlist empty,
ahh i see. maybe add a "force to keep" option that will prevent the provider playlist from getting removed from the db no matter what?
I'm a +1, for the request to implement this feature.
Yes you are right, this should not happen. But what when we have for example 3 inputs and one is not responding? We cant process the list because all the steps are applied to the complete merged raw list.
In this example, maybe the first step could be to restore from the database, for the 3 inputs as a starting block, then perform the refresh, overwriting restored data, if there is a failure, the old data remains for the failed input, and finally the data is merged and returned to the database.
(Sorry I'm no programmer... it's just what I think might be/could happen?)
Or create an option for 1-to-1 downloads, for scenarios where there is only one input source for the target(s), where this feature could be enabled and the database not updated on failure?
@solohpgh can you dm me on discord ?