Merge pull request #77 from www2000/dev-m3u-fix

Fix channel issues that i have with m3u files comming form tvheaden.
This commit is contained in:
SergeantPanda 2025-04-30 18:19:26 -05:00 committed by GitHub
commit 5475177cf4
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

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'])