refactor api controller to internalize server fetch

This commit is contained in:
jeffvli 2025-11-02 21:56:35 -08:00
parent 8dbaec3943
commit c7a473d864
79 changed files with 904 additions and 399 deletions

View file

@ -6,7 +6,6 @@ import { controller } from '/@/renderer/api/controller';
import {
DiscordDisplayType,
DiscordLinkType,
getServerById,
useAppStore,
useDiscordSettings,
useGeneralSettings,
@ -123,11 +122,9 @@ export const useDiscordRpc = () => {
if (song.serverType === ServerType.JELLYFIN && song.imageUrl) {
activity.largeImageKey = song.imageUrl;
} else if (song.serverType === ServerType.NAVIDROME) {
const server = getServerById(song.serverId);
try {
const info = await controller.getAlbumInfo({
apiClientProps: { server },
apiClientProps: { serverId: song.serverId },
query: { id: song.albumId },
});