Skip to content

Commit

Permalink
Backport pull request #5949 from jellyfin-web/release-10.9.z
Browse files Browse the repository at this point in the history
Fix play all & shuffle not working on genres

Original-merge: ef00d43

Merged-by: thornbill <thornbill@users.noreply.github.com>

Backported-by: Joshua M. Boniface <joshua@boniface.me>
  • Loading branch information
viown authored and joshuaboniface committed Sep 7, 2024
1 parent d0a749b commit cf9af1f
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/components/playback/playbackmanager.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
4 changes: 4 additions & 0 deletions src/controllers/list.js
Original file line number Diff line number Diff line change
Expand Up @@ -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({
Expand Down

0 comments on commit cf9af1f

Please sign in to comment.