Removed unnecessary elif for invalid flag.

This commit is contained in:
SergeantPanda 2025-04-30 18:22:27 -05:00
parent 5475177cf4
commit a50a7372c1

View file

@ -265,9 +265,7 @@ class ChannelViewSet(viewsets.ModelViewSet):
stream_custom_props = json.loads(stream.custom_properties) if stream.custom_properties else {}
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:
if '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,9 +386,7 @@ class ChannelViewSet(viewsets.ModelViewSet):
stream_custom_props = json.loads(stream.custom_properties) if stream.custom_properties else {}
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:
if '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'])