[feat]: actually include version checks

This commit is contained in:
Kendall Garner
2024-02-17 00:57:10 -08:00
36 changed files with 224 additions and 222 deletions
@@ -8,13 +8,14 @@ import {
LyricGetQuery,
SubsonicExtensions,
StructuredLyric,
ServerType,
} from '/@/renderer/api/types';
import { QueryHookArgs } from '/@/renderer/lib/react-query';
import { getServerById, useLyricsSettings } from '/@/renderer/store';
import { queryKeys } from '/@/renderer/api/query-keys';
import { ServerType } from '/@/renderer/types';
import { api } from '/@/renderer/api';
import isElectron from 'is-electron';
import { hasFeature } from '/@/renderer/api/utils';
const lyricsIpc = isElectron() ? window.electron.lyrics : null;
@@ -112,7 +113,7 @@ export const useSongLyricsBySong = (
source: server?.name ?? 'music server',
};
}
} else if (server.features && SubsonicExtensions.SONG_LYRICS in server.features) {
} else if (hasFeature(server, SubsonicExtensions.SONG_LYRICS)) {
const subsonicLyrics = await api.controller
.getStructuredLyrics({
apiClientProps: { server, signal },