From c5748346eb9dadc4054b55a41443293ae06bc932 Mon Sep 17 00:00:00 2001 From: SergeantPanda Date: Wed, 16 Apr 2025 09:40:29 -0500 Subject: [PATCH 1/4] Fixes stream ordering. --- apps/channels/serializers.py | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/apps/channels/serializers.py b/apps/channels/serializers.py index ab2c5dfc..310d9feb 100644 --- a/apps/channels/serializers.py +++ b/apps/channels/serializers.py @@ -209,7 +209,19 @@ class ChannelSerializer(serializers.ModelSerializer): # Handle streams if provided if stream_ids is not None: - instance.streams.set(stream_ids) + # Clear existing associations + instance.channelstream_set.all().delete() + + # Create new associations with proper ordering + for index, stream in enumerate(stream_ids): + # Extract the ID from the Stream object + actual_stream_id = stream.id if hasattr(stream, "id") else stream + print(f'Setting stream {actual_stream_id} to index {index}') + ChannelStream.objects.create( + channel=instance, + stream_id=actual_stream_id, + order=index + ) return instance From b5a5a6868f3ca15aa86e8c604b5a9b7ffbe7e882 Mon Sep 17 00:00:00 2001 From: GitHub Actions Date: Wed, 16 Apr 2025 14:41:07 +0000 Subject: [PATCH 2/4] Increment build number to 7 [skip ci] --- version.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/version.py b/version.py index bc7e6438..ba5ac281 100644 --- a/version.py +++ b/version.py @@ -2,4 +2,4 @@ Dispatcharr version information. """ __version__ = '0.3.0' # Follow semantic versioning (MAJOR.MINOR.PATCH) -__build__ = '6' # Auto-incremented on builds +__build__ = '7' # Auto-incremented on builds From 1297ca4c260463b2d7579ea9a0fbca56eb1c3f6c Mon Sep 17 00:00:00 2001 From: SergeantPanda Date: Wed, 16 Apr 2025 09:42:56 -0500 Subject: [PATCH 3/4] bump build --- version.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/version.py b/version.py index 8e31e3a6..33c06bd0 100644 --- a/version.py +++ b/version.py @@ -2,4 +2,4 @@ Dispatcharr version information. """ __version__ = '0.3.1' # Follow semantic versioning (MAJOR.MINOR.PATCH) -__build__ = '0' # Auto-incremented on builds +__build__ = '1' # Auto-incremented on builds From e44ec6b951aab9fb09011b9c1b5372bd24cd1b93 Mon Sep 17 00:00:00 2001 From: GitHub Actions Date: Wed, 16 Apr 2025 14:43:17 +0000 Subject: [PATCH 4/4] Increment build number to 2 [skip ci] --- version.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/version.py b/version.py index 33c06bd0..f5e884d0 100644 --- a/version.py +++ b/version.py @@ -2,4 +2,4 @@ Dispatcharr version information. """ __version__ = '0.3.1' # Follow semantic versioning (MAJOR.MINOR.PATCH) -__build__ = '1' # Auto-incremented on builds +__build__ = '2' # Auto-incremented on builds