Removing unreachable code

This commit is contained in:
DawtCom 2025-12-08 21:50:13 -06:00
parent 4df4e5f963
commit e8fb01ebdd

View file

@ -161,18 +161,7 @@ def generate_m3u(request, profile_name=None, user=None):
channelprofilemembership__enabled=True
).order_by('channel_number')
else:
if profile_name is not None:
try:
channel_profile = ChannelProfile.objects.get(name=profile_name)
except ChannelProfile.DoesNotExist:
logger.warning("Requested channel profile (%s) during m3u generation does not exist", profile_name)
raise Http404(f"Channel profile '{profile_name}' not found")
channels = Channel.objects.filter(
channelprofilemembership__channel_profile=channel_profile,
channelprofilemembership__enabled=True,
).order_by("channel_number")
else:
channels = Channel.objects.order_by("channel_number")
channels = Channel.objects.order_by("channel_number")
# Check if the request wants to use direct logo URLs instead of cache
use_cached_logos = request.GET.get('cachedlogos', 'true').lower() != 'false'