From 5eb118478bba5a337ce1e369f5ef7b45d42c5aa6 Mon Sep 17 00:00:00 2001 From: nemesbak Date: Thu, 28 May 2026 13:39:05 +0200 Subject: [PATCH 1/2] fix(channels): honor stream profile override in Channel.get_stream_profile() MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Channel.get_stream_profile() read self.stream_profile directly, bypassing the override system. The override-aware property effective_stream_profile_obj already existed and called _resolve_effective_fk('stream_profile') which correctly picks override.stream_profile when set, but nothing in the streaming path called it. As a result, a per-channel 'Stream Profile' override saved through the UI was visible in the channel edit form (yellow pencil indicator appeared) but silently ignored at stream time — Dispatcharr always used the global default profile regardless of what was configured per-channel. Fix: call effective_stream_profile_obj in get_stream_profile() so that all callers (live proxy url_utils, input manager, views) automatically pick up channel-level overrides without any further changes. Fixes #1268 Co-Authored-By: Claude Sonnet 4.6 --- apps/channels/models.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/apps/channels/models.py b/apps/channels/models.py index 59af3e00..179ab5bd 100644 --- a/apps/channels/models.py +++ b/apps/channels/models.py @@ -451,9 +451,11 @@ class Channel(models.Model): def effective_stream_profile_obj(self): return self._resolve_effective_fk("stream_profile") - # @TODO: honor stream's stream profile def get_stream_profile(self): - stream_profile = self.stream_profile + # Respect per-channel overrides: effective_stream_profile_obj uses + # _resolve_effective_fk which picks override.stream_profile when set, + # falling back to the channel's own stream_profile field. + stream_profile = self.effective_stream_profile_obj if not stream_profile: stream_profile = StreamProfile.objects.get( id=CoreSettings.get_default_stream_profile_id() From b63650799ac3334fce751a6ce1ef2efb3d2ca4da Mon Sep 17 00:00:00 2001 From: SergeantPanda Date: Fri, 29 May 2026 17:07:55 -0500 Subject: [PATCH 2/2] docs: Restored todo as this did not resolve it. Cleaned up overly verbose comment. --- apps/channels/models.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/apps/channels/models.py b/apps/channels/models.py index 179ab5bd..320470bb 100644 --- a/apps/channels/models.py +++ b/apps/channels/models.py @@ -451,10 +451,8 @@ class Channel(models.Model): def effective_stream_profile_obj(self): return self._resolve_effective_fk("stream_profile") + # @TODO: honor stream's stream profile def get_stream_profile(self): - # Respect per-channel overrides: effective_stream_profile_obj uses - # _resolve_effective_fk which picks override.stream_profile when set, - # falling back to the channel's own stream_profile field. stream_profile = self.effective_stream_profile_obj if not stream_profile: stream_profile = StreamProfile.objects.get(