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

Merge pull request #6111 from davidmurdoch/fix-movies-shuffle

This commit is contained in:
Bill Thornton 2024-09-27 01:40:52 -04:00 committed by GitHub
commit c5bebf7c59
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -31,11 +31,16 @@ export default function (view, params, tabContent, options) {
}
function shuffle() {
ApiClient.getItem(
ApiClient.getCurrentUserId(),
params.topParentId
).then((item) => {
playbackManager.shuffle(item);
isLoading = true;
loading.show();
const newQuery = { ...query, SortBy: 'Random', StartIndex: 0, Limit: 300 };
return ApiClient.getItems(ApiClient.getCurrentUserId(), newQuery).then(({ Items }) => {
playbackManager.play({
items: Items,
autoplay: true
});
}).finally(() => {
isLoading = false;
});
}