mirror of
https://github.com/antebudimir/feishin.git
synced 2026-01-03 03:11:40 +00:00
refactor api controller to internalize server fetch
This commit is contained in:
parent
8dbaec3943
commit
c7a473d864
79 changed files with 904 additions and 399 deletions
|
|
@ -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 },
|
||||
});
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue