From 5f2d5bf6451a1924eaed53cdbb8dd47c1bd1b7f7 Mon Sep 17 00:00:00 2001 From: Nirvana Date: Mon, 25 May 2026 20:41:27 +0200 Subject: [PATCH] work on joyn auth --- lib/streaming_providers/providers/magenta2/provider.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/streaming_providers/providers/magenta2/provider.py b/lib/streaming_providers/providers/magenta2/provider.py index 4e449e2..0e2e44e 100644 --- a/lib/streaming_providers/providers/magenta2/provider.py +++ b/lib/streaming_providers/providers/magenta2/provider.py @@ -1033,7 +1033,9 @@ class Magenta2Provider(StreamingProvider): ) # Persist the full channel list so subsequent get_channels() calls # return immediately from cache without any network requests. - self._cached_channels: List[StreamingChannel] = channels + # Sort by channel number; channels without a number go to the end + channels.sort(key=lambda ch: (ch.channel_number is None, ch.channel_number or 0)) + self._cached_channels = channels return channels except Exception as e: