mirror of
https://github.com/jeffvli/feishin.git
synced 2026-05-08 13:00:13 +02:00
Normalize server feature set
This commit is contained in:
@@ -6,7 +6,6 @@ import {
|
||||
InternetProviderLyricResponse,
|
||||
FullLyricsMetadata,
|
||||
LyricGetQuery,
|
||||
SubsonicExtensions,
|
||||
StructuredLyric,
|
||||
ServerType,
|
||||
} from '/@/renderer/api/types';
|
||||
@@ -16,6 +15,7 @@ import { queryKeys } from '/@/renderer/api/query-keys';
|
||||
import { api } from '/@/renderer/api';
|
||||
import isElectron from 'is-electron';
|
||||
import { hasFeature } from '/@/renderer/api/utils';
|
||||
import { ServerFeature } from '/@/renderer/api/features.types';
|
||||
|
||||
const lyricsIpc = isElectron() ? window.electron.lyrics : null;
|
||||
|
||||
@@ -113,7 +113,7 @@ export const useSongLyricsBySong = (
|
||||
source: server?.name ?? 'music server',
|
||||
};
|
||||
}
|
||||
} else if (hasFeature(server, SubsonicExtensions.SONG_LYRICS)) {
|
||||
} else if (hasFeature(server, ServerFeature.SONG_LYRICS)) {
|
||||
const subsonicLyrics = await api.controller
|
||||
.getStructuredLyrics({
|
||||
apiClientProps: { server, signal },
|
||||
|
||||
Reference in New Issue
Block a user