xteve-project / xTeVe

M3U Proxy for Plex DVR and Emby Live TV
MIT License
1.77k stars 228 forks source link

Allow defining multiple identical m3us #262

Open theonlysupremepanda opened 3 years ago

theonlysupremepanda commented 3 years ago

My IPTV provider only allows 1 concurrent stream per m3u provided. It would be great if we could define multiple m3us a nd have xteve handle choose which m3u to retrieve a stream from.

Describe the solution you'd like If this could be exposed in terms of a number of tuners to clients like Plex that would be amazing.

Describe alternatives you've considered I considered using some kind of fake M3U to point Xteve at which would contain links to my own intermediate server which would try and determine which m3u to use and redirect, but this would not work as we need to keep track of whether a client is connected or not. Xteve knows this and is well set up to support something like this.

theonlysupremepanda commented 3 years ago

This would clearly only work in the case when buffering is enabled as you'd need to keep a handle on client connections.

theonlysupremepanda commented 3 years ago

I'm reading through the code and all of this seems quite feasible with some tweaking of buffer.go and some tweaks to the data schema. Where we are checking if a given playlist will accept another stream, we would move onto the same channel in the next playlist (if there is one defined) and stream from there instead.

I don't speak german and have very little go experience so putting a prototype together would take me some time but I'm tempted to give it a go.