mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
Allow for unlimited photos in playbackmanager
This commit is contained in:
parent
bfa95fa3a7
commit
692b6ae7a2
1 changed files with 11 additions and 4 deletions
|
@ -12,6 +12,8 @@ import Screenfull from 'screenfull';
|
||||||
import ServerConnections from '../ServerConnections';
|
import ServerConnections from '../ServerConnections';
|
||||||
import alert from '../alert';
|
import alert from '../alert';
|
||||||
|
|
||||||
|
const UNLIMITED_ITEMS = -1;
|
||||||
|
|
||||||
function enableLocalPlaylistManagement(player) {
|
function enableLocalPlaylistManagement(player) {
|
||||||
if (player.getPlaylist) {
|
if (player.getPlaylist) {
|
||||||
return false;
|
return false;
|
||||||
|
@ -119,7 +121,11 @@ function getItemsForPlayback(serverId, query) {
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
query.Limit = query.Limit || 300;
|
if (query.Limit === UNLIMITED_ITEMS) {
|
||||||
|
delete query.Limit;
|
||||||
|
} else {
|
||||||
|
query.Limit = query.Limit || 300;
|
||||||
|
}
|
||||||
query.Fields = 'Chapters';
|
query.Fields = 'Chapters';
|
||||||
query.ExcludeLocationTypes = 'Virtual';
|
query.ExcludeLocationTypes = 'Virtual';
|
||||||
query.EnableTotalRecordCount = false;
|
query.EnableTotalRecordCount = false;
|
||||||
|
@ -1774,7 +1780,8 @@ class PlaybackManager {
|
||||||
// Setting this to true may cause some incorrect sorting
|
// Setting this to true may cause some incorrect sorting
|
||||||
Recursive: false,
|
Recursive: false,
|
||||||
SortBy: options.shuffle ? 'Random' : 'SortName',
|
SortBy: options.shuffle ? 'Random' : 'SortName',
|
||||||
MediaTypes: 'Photo,Video'
|
MediaTypes: 'Photo,Video',
|
||||||
|
Limit: UNLIMITED_ITEMS
|
||||||
}).then(function (result) {
|
}).then(function (result) {
|
||||||
const items = result.Items;
|
const items = result.Items;
|
||||||
|
|
||||||
|
@ -1799,7 +1806,7 @@ class PlaybackManager {
|
||||||
SortBy: options.shuffle ? 'Random' : 'SortName',
|
SortBy: options.shuffle ? 'Random' : 'SortName',
|
||||||
// Only include Photos because we do not handle mixed queues currently
|
// Only include Photos because we do not handle mixed queues currently
|
||||||
MediaTypes: 'Photo',
|
MediaTypes: 'Photo',
|
||||||
Limit: 1000
|
Limit: UNLIMITED_ITEMS
|
||||||
});
|
});
|
||||||
} else if (firstItem.Type === 'MusicGenre') {
|
} else if (firstItem.Type === 'MusicGenre') {
|
||||||
promise = getItemsForPlayback(serverId, {
|
promise = getItemsForPlayback(serverId, {
|
||||||
|
@ -1817,7 +1824,7 @@ class PlaybackManager {
|
||||||
SortBy: options.shuffle ? 'Random' : 'SortName',
|
SortBy: options.shuffle ? 'Random' : 'SortName',
|
||||||
// Only include Photos because we do not handle mixed queues currently
|
// Only include Photos because we do not handle mixed queues currently
|
||||||
MediaTypes: 'Photo',
|
MediaTypes: 'Photo',
|
||||||
Limit: 1000
|
Limit: UNLIMITED_ITEMS
|
||||||
}, queryOptions));
|
}, queryOptions));
|
||||||
} else if (firstItem.IsFolder) {
|
} else if (firstItem.IsFolder) {
|
||||||
promise = getItemsForPlayback(serverId, mergePlaybackQueries({
|
promise = getItemsForPlayback(serverId, mergePlaybackQueries({
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue