From d61de87fffed000b5d30a410c567b274be19648f Mon Sep 17 00:00:00 2001 From: Jean-Paul Acneaux Date: Wed, 30 Apr 2025 05:10:31 +0200 Subject: [PATCH] Fix channel issues that i have with m3u files comming form tvheaden. And add tvg-chno tag for finding channel numbers. --- apps/channels/api_views.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/apps/channels/api_views.py b/apps/channels/api_views.py index ccd942d6..36a5b0e1 100644 --- a/apps/channels/api_views.py +++ b/apps/channels/api_views.py @@ -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'])