From ba5aa861e334e6fc698bb64e5444f25d6bb511ed Mon Sep 17 00:00:00 2001 From: SergeantPanda Date: Fri, 9 Jan 2026 10:26:09 -0600 Subject: [PATCH] Bug Fix: Fixed Channel Profile filter incorrectly applying profile membership filtering even when "Show Disabled" was enabled, preventing all channels from being displayed. Profile filter now only applies when hiding disabled channels. (Fixes #825) --- CHANGELOG.md | 1 + apps/channels/api_views.py | 7 ++++++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 01f9bcb5..a8890376 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -16,6 +16,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Fixed +- Fixed Channel Profile filter incorrectly applying profile membership filtering even when "Show Disabled" was enabled, preventing all channels from being displayed. Profile filter now only applies when hiding disabled channels. (Fixes #825) - Fixed VOD streams disappearing from stats page during playback by adding `socket-timeout = 600` to production uWSGI config. The missing directive caused uWSGI to use its default 4-second timeout, triggering premature cleanup when clients buffered content. Now matches the existing `http-timeout = 600` value and prevents timeout errors during normal client buffering - Thanks [@patchy8736](https://github.com/patchy8736) - Fixed Channels table EPG column showing "Not Assigned" on initial load for users with large EPG datasets. Added `tvgsLoaded` flag to EPG store to track when EPG data has finished loading, ensuring the table waits for EPG data before displaying. EPG cells now show animated skeleton placeholders while loading instead of incorrectly showing "Not Assigned". (Fixes #810) - Fixed VOD profile connection count not being decremented when stream connection fails (timeout, 404, etc.), preventing profiles from reaching capacity limits and rejecting valid stream requests diff --git a/apps/channels/api_views.py b/apps/channels/api_views.py index e162f63a..3a9e0c37 100644 --- a/apps/channels/api_views.py +++ b/apps/channels/api_views.py @@ -432,10 +432,15 @@ class ChannelViewSet(viewsets.ModelViewSet): if channel_profile_id: try: profile_id_int = int(channel_profile_id) - filters["channelprofilemembership__channel_profile_id"] = profile_id_int if show_disabled_param is None: + # Show only enabled channels: channels that have a membership + # record for this profile with enabled=True + # Default is DISABLED (channels without membership are hidden) + filters["channelprofilemembership__channel_profile_id"] = profile_id_int filters["channelprofilemembership__enabled"] = True + # If show_disabled is True, show all channels (no filtering needed) + except (ValueError, TypeError): # Ignore invalid profile id values pass