Merge pull request #2943 from thornbill/fix-play-all

Fix play all and shuffle buttons
This commit is contained in:
Bill Thornton 2021-09-17 14:03:18 -04:00 committed by GitHub
commit 2cf9f05c43
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 30 additions and 3 deletions

View file

@ -1797,7 +1797,8 @@ class PlaybackManager {
// Setting this to true may cause some incorrect sorting
Recursive: false,
SortBy: options.shuffle ? 'Random' : 'SortName',
MediaTypes: 'Photo,Video',
// Only include Photos because we do not handle mixed queues currently
MediaTypes: 'Photo',
Limit: 1000
});
} else if (firstItem.Type === 'MusicGenre') {
@ -1808,6 +1809,16 @@ class PlaybackManager {
SortBy: options.shuffle ? 'Random' : 'SortName',
MediaTypes: 'Audio'
});
} else if (firstItem.IsFolder && firstItem.CollectionType === 'homevideos') {
promise = getItemsForPlayback(serverId, mergePlaybackQueries({
ParentId: firstItem.Id,
Filters: 'IsNotFolder',
Recursive: true,
SortBy: options.shuffle ? 'Random' : 'SortName',
// Only include Photos because we do not handle mixed queues currently
MediaTypes: 'Photo',
Limit: 1000
}, queryOptions));
} else if (firstItem.IsFolder) {
promise = getItemsForPlayback(serverId, mergePlaybackQueries({
ParentId: firstItem.Id,