xteve-project / xTeVe

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

A list with multiple channels using the same tvg-id is incorrectly parsed, causing the alternative URL's to be discarded for a single stream url #347

Open ilikenwf opened 1 year ago

ilikenwf commented 1 year ago

If one imports a list such as the IPTV-Org list: https://raw.githubusercontent.com/iptv-org/iptv/master/streams/us.m3u

We see that multiple cases of alternate streams existing for a given channel, using the same tvg-id because it is the same channel, just from alternative sources.

#EXTINF:-1 tvg-id="Reelz.us" status="online",Reelz Channel
https://bcovlive-a.akamaihd.net/c733a9aa448a4a44a10c527c6f5bf7a4/us-east-1/5245389775001/playlist.m3u8
#EXTINF:-1 tvg-id="Reelz.us" status="timeout",Reelz (720p) [Not 24/7]
https://a.jsrdn.com/broadcast/d37066a396/+0000/c.m3u8

The problem with this is that xTeve is only using one stream URL and reuses it for every subsequent appearance of that tvg-id for the list in question.

In the example above, xTeve's m3u output resolves both "Reelz Channel" and "Reelz (720p) to the "https://a.jsrdn.com/broadcast/d37066a396/+0000/c.m3u8" URL instead of each to their respective URLs.

ilikenwf commented 1 year ago

After testing it appears this happens any time I alter ANY settigs with the mapping editor...be it a channel number, or just enabling/disabling in bulk.

MCTyler commented 1 year ago

See "Filters" and "Mapping" in the Docs.

ilikenwf commented 1 year ago

I modified the hashing fuction in xepg.go to also take the m3u filename into account, and this fixes the issue as it does appear the iptv-org at least avoids duplicate channel names.