Add Play All and Shuffle buttons to Music Videos Libraries (#6866)
* Add play all & shuffle to Music Videos * Update comments --------- Co-authored-by: Max <no@example.com>
This commit is contained in:
@@ -1940,6 +1940,15 @@ export class PlaybackManager {
|
||||
MediaTypes: 'Photo',
|
||||
Limit: UNLIMITED_ITEMS
|
||||
}, queryOptions));
|
||||
} else if (firstItem.IsFolder && firstItem.CollectionType === 'musicvideos') {
|
||||
return getItemsForPlayback(serverId, mergePlaybackQueries({
|
||||
ParentId: firstItem.Id,
|
||||
Filters: 'IsFolder',
|
||||
Recursive: true,
|
||||
SortBy: options.shuffle ? 'Random' : 'SortName',
|
||||
MediaTypes: 'Video',
|
||||
Limit: UNLIMITED_ITEMS
|
||||
}, queryOptions));
|
||||
} else if (firstItem.IsFolder) {
|
||||
let sortBy = null;
|
||||
if (options.shuffle) {
|
||||
|
||||
@@ -889,8 +889,8 @@ class ItemsView {
|
||||
if ((itemType === 'MusicGenre' || params.type !== 'Programs' && itemType !== 'Channel')
|
||||
// Folder, Playlist views
|
||||
&& itemType !== 'UserView'
|
||||
// Only Photo (homevideos) CollectionFolders are supported
|
||||
&& !(itemType === 'CollectionFolder' && item?.CollectionType !== CollectionType.Homevideos)
|
||||
// Only Photo (homevideos) and Music Video CollectionFolders are supported
|
||||
&& !(itemType === 'CollectionFolder' && item?.CollectionType !== CollectionType.Homevideos && item?.CollectionType !== CollectionType.Musicvideos)
|
||||
) {
|
||||
// Show Play All buttons
|
||||
hideOrShowAll(view.querySelectorAll('.btnPlay'), false);
|
||||
@@ -902,8 +902,8 @@ class ItemsView {
|
||||
if ((itemType === 'MusicGenre' || params.type !== 'Programs' && params.type !== 'nextup' && itemType !== 'Channel')
|
||||
// Folder, Playlist views
|
||||
&& itemType !== 'UserView'
|
||||
// Only Photo (homevideos) CollectionFolders are supported
|
||||
&& !(itemType === 'CollectionFolder' && item?.CollectionType !== CollectionType.Homevideos)
|
||||
// Only Photo (homevideos) and Music Video CollectionFolders are supported
|
||||
&& !(itemType === 'CollectionFolder' && item?.CollectionType !== CollectionType.Homevideos && item?.CollectionType !== CollectionType.Musicvideos)
|
||||
) {
|
||||
// Show Shuffle buttons
|
||||
hideOrShowAll(view.querySelectorAll('.btnShuffle'), false);
|
||||
|
||||
Reference in New Issue
Block a user