mirror of
https://github.com/jeffvli/feishin.git
synced 2026-05-09 20:29:36 +02:00
refactor api controller to internalize server fetch
This commit is contained in:
@@ -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 },
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user