From cf9af1f392b5cc79e4425ccd9fb1445e9a17ed78 Mon Sep 17 00:00:00 2001 From: viown <48097677+viown@users.noreply.github.com> Date: Sat, 7 Sep 2024 18:07:29 -0400 Subject: [PATCH] Backport pull request #5949 from jellyfin-web/release-10.9.z Fix play all & shuffle not working on genres Original-merge: ef00d439b1148de5acad9a5d9a928aa86ff7a792 Merged-by: thornbill Backported-by: Joshua M. Boniface --- src/components/playback/playbackmanager.js | 9 +++++++++ src/controllers/list.js | 4 ++++ 2 files changed, 13 insertions(+) diff --git a/src/components/playback/playbackmanager.js b/src/components/playback/playbackmanager.js index 72fa188c422..adfecb0eef2 100644 --- a/src/components/playback/playbackmanager.js +++ b/src/components/playback/playbackmanager.js @@ -1862,6 +1862,15 @@ class PlaybackManager { SortBy: options.shuffle ? 'Random' : 'SortName', MediaTypes: 'Audio' }, queryOptions)); + case 'Genre': + return getItemsForPlayback(serverId, mergePlaybackQueries({ + GenreIds: firstItem.Id, + ParentId: firstItem.ParentId, + Filters: 'IsNotFolder', + Recursive: true, + SortBy: options.shuffle ? 'Random' : 'SortName', + MediaTypes: 'Video' + }, queryOptions)); case 'Series': case 'Season': return getSeriesOrSeasonPlaybackPromise(firstItem, options, items); diff --git a/src/controllers/list.js b/src/controllers/list.js index 02da709c034..5b8039dc9c1 100644 --- a/src/controllers/list.js +++ b/src/controllers/list.js @@ -851,6 +851,10 @@ class ItemsView { setTitle(null); getItem(params).then(function (item) { setTitle(item); + if (item.Type == 'Genre') { + item.ParentId = params.parentId; + } + self.currentItem = item; const refresh = !isRestored; self.itemsContainer.resume({