Fix channel issues that i have with m3u files comming form tvheaden.

And add tvg-chno tag for finding channel numbers.
This commit is contained in:
Jean-Paul Acneaux 2025-04-30 05:10:31 +02:00
parent 418bf01449
commit d61de87fff

View file

@ -267,6 +267,8 @@ class ChannelViewSet(viewsets.ModelViewSet):
channel_number = None
if 'tv-chno' in stream_custom_props:
channel_number = int(stream_custom_props['tv-chno'])
elif 'tvg-chno' in stream_custom_props:
channel_number = int(stream_custom_props['tvg-chno'])
elif 'channel-number' in stream_custom_props:
channel_number = int(stream_custom_props['channel-number'])
@ -388,6 +390,8 @@ class ChannelViewSet(viewsets.ModelViewSet):
channel_number = None
if 'tv-chno' in stream_custom_props:
channel_number = int(stream_custom_props['tv-chno'])
elif 'tvg-chno' in stream_custom_props:
channel_number = int(stream_custom_props['tvg-chno'])
elif 'channel-number' in stream_custom_props:
channel_number = int(stream_custom_props['channel-number'])