add navidrome version check for smart playlists

This commit is contained in:
Kendall Garner 2024-02-03 22:47:57 -08:00
parent 46cc1a635f
commit aba7cb302f
No known key found for this signature in database
GPG key ID: 18D2767419676C87
11 changed files with 201 additions and 212 deletions

View file

@ -15,6 +15,7 @@ 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 },