1
0
Fork 0
mirror of https://github.com/jellyfin/jellyfin-web synced 2025-03-30 19:56:21 +00:00

Limit number of results returned since we only use 1

This commit is contained in:
David Murdoch 2024-09-24 12:43:23 -04:00
parent 74c735dbd0
commit f52ac7a96d

View file

@ -33,7 +33,7 @@ export default function (view, params, tabContent, options) {
function shuffle() { function shuffle() {
isLoading = true; isLoading = true;
loading.show(); loading.show();
const newQuery = { ...query, SortBy: 'Random' }; const newQuery = { ...query, SortBy: 'Random', Limit: 1 };
return ApiClient.getItems(ApiClient.getCurrentUserId(), newQuery).then(({ Items }) => { return ApiClient.getItems(ApiClient.getCurrentUserId(), newQuery).then(({ Items }) => {
playbackManager.shuffle(Items[0]); playbackManager.shuffle(Items[0]);
}); });