Update src/controllers/movies/movies.js

Co-authored-by: Dmitry Lyzo <56478732+dmitrylyzo@users.noreply.github.com>
This commit is contained in:
David Murdoch 2024-09-26 16:15:18 -04:00 committed by GitHub
parent bb78451102
commit ce4aded654
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

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