mirror of
https://github.com/jellyfin/jellyfin-web.git
synced 2025-09-10 22:43:50 +02:00
Updated the theme media player to playback content in a Random order
This commit is contained in:
@@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user