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

@ -3,6 +3,7 @@ import { useAuthStoreActions, useCurrentServer } from '/@/renderer/store';
import { useQuery } from '@tanstack/react-query';
import { queryKeys } from '/@/renderer/api/query-keys';
import { controller } from '/@/renderer/api/controller';
import isEqual from 'lodash/isEqual';
export const useServerVersion = () => {
const { updateServer } = useAuthStoreActions();
@ -24,7 +25,7 @@ export const useServerVersion = () => {
useEffect(() => {
if (server && server.id === serverInfo.data?.id) {
const { version, features } = serverInfo.data;
if (version !== server.version) {
if (version !== server.version || !isEqual(features, server.features)) {
updateServer(server.id, {
features,
version,