From 7b8a47aac12c3ad5ba88ec55879adca5bebe3f19 Mon Sep 17 00:00:00 2001 From: edde746 <86283021+edde746@users.noreply.github.com> Date: Sat, 4 Apr 2026 16:05:44 +0200 Subject: [PATCH] fix: include previous episodes in play queue --- lib/services/plex_client.dart | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/lib/services/plex_client.dart b/lib/services/plex_client.dart index b3de88c7..dd502b64 100644 --- a/lib/services/plex_client.dart +++ b/lib/services/plex_client.dart @@ -2073,22 +2073,13 @@ class PlexClient { throw Exception('Could not get server machine identifier'); } - // When starting from a specific episode, use continuous mode - // This lets the server determine playback order (respects episodeSort) - if (startingEpisodeKey != null && shuffle == 0) { - final uri = 'server://$machineId/com.plexapp.plugins.library/library/metadata/$startingEpisodeKey'; - return await createPlayQueue( - uri: uri, - type: 'video', - continuous: 1, - ); - } - final uri = 'server://$machineId/com.plexapp.plugins.library/library/metadata/$showRatingKey/children'; return await createPlayQueue( uri: uri, type: 'video', shuffle: shuffle, + key: startingEpisodeKey != null ? '/library/metadata/$startingEpisodeKey' : null, + continuous: startingEpisodeKey != null && shuffle == 0 ? 1 : 0, ); } catch (e) { appLogger.e('Failed to create show play queue', error: e);