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

Merge pull request #5714 from ItsAllAboutTheCode/theme-media-shuffle

This commit is contained in:
Bill Thornton 2025-02-13 16:30:51 -05:00 committed by GitHub
commit 7433a4a56a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 8 additions and 2 deletions

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;