Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix play all & shuffle not working on genres #5949

Merged
merged 4 commits into from
Aug 27, 2024
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
5 changes: 5 additions & 0 deletions src/controllers/list.js
Original file line number Diff line number Diff line change
Expand Up @@ -851,6 +851,11 @@
setTitle(null);
getItem(params).then(function (item) {
setTitle(item);

Check failure on line 854 in src/controllers/list.js

View workflow job for this annotation

GitHub Actions / Run eslint

Trailing spaces not allowed
viown marked this conversation as resolved.
Show resolved Hide resolved
if (item.Type == 'Genre') {
thornbill marked this conversation as resolved.
Show resolved Hide resolved
item.ParentId = params.parentId;
}

self.currentItem = item;
const refresh = !isRestored;
self.itemsContainer.resume({
Expand Down
Loading