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:
parent
218912dffd
commit
578c643731
2 changed files with 8 additions and 2 deletions
|
@ -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
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue