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

Updated the theme media player to playback content in a Random order

This commit is contained in:
ItsAllAboutTheCode 2025-02-13 12:00:01 -06:00
parent 218912dffd
commit 578c643731
2 changed files with 8 additions and 2 deletions

View file

@ -94,6 +94,7 @@
- [iFraan](https://github.com/iFraan)
- [Ali](https://github.com/bu3alwa)
- [K. Kyle Puchkov](https://github.com/kepper104)
- [ItsAllAboutTheCode](https://github.com/ItsAllAboutTheCode)
## Emby Contributors

View file

@ -10,6 +10,7 @@ import { queryClient } from 'utils/query/queryClient';
import { playbackManager } from './playback/playbackmanager';
import ServerConnections from './ServerConnections';
import { ItemSortBy } from '@jellyfin/sdk/lib/generated-client';
let currentOwnerId;
let currentThemeIds = [];
@ -96,8 +97,12 @@ async function loadThemeMedia(serverId, itemId) {
return;
}
const { data: themeMedia } = await getLibraryApi(api)
.getThemeMedia({ userId, itemId: item.Id, inheritFromParent: true });
const { data: themeMedia } = await getLibraryApi(api).getThemeMedia({
userId,
itemId: item.Id,
inheritFromParent: true,
sortBy: [ItemSortBy.Random]
});
const result = userSettings.enableThemeVideos() && themeMedia.ThemeVideosResult?.Items?.length ? themeMedia.ThemeVideosResult : themeMedia.ThemeSongsResult;