From 7ba2f6b827dacefc207134bd7b58b3c882e9cbd9 Mon Sep 17 00:00:00 2001 From: jeffvli Date: Thu, 12 Feb 2026 22:04:08 -0800 Subject: [PATCH] fix removed filter functions --- .../components/song-list-header-filters.tsx | 1 - .../songs/hooks/use-song-list-filters.ts | 30 +------------------ 2 files changed, 1 insertion(+), 30 deletions(-) diff --git a/src/renderer/features/songs/components/song-list-header-filters.tsx b/src/renderer/features/songs/components/song-list-header-filters.tsx index 93961b05a..8c40c38aa 100644 --- a/src/renderer/features/songs/components/song-list-header-filters.tsx +++ b/src/renderer/features/songs/components/song-list-header-filters.tsx @@ -52,7 +52,6 @@ export const SongListHeaderFilters = ({ toggleGenreTarget }: { toggleGenreTarget const query = songFilters.query; return Boolean( isFilterValueSet(query[FILTER_KEYS.SONG._CUSTOM]) || - isFilterValueSet(query[FILTER_KEYS.SONG.ALBUM_IDS]) || isFilterValueSet(query[FILTER_KEYS.SONG.ARTIST_IDS]) || query[FILTER_KEYS.SONG.FAVORITE] !== undefined || isFilterValueSet(query[FILTER_KEYS.SONG.GENRE_ID]) || diff --git a/src/renderer/features/songs/hooks/use-song-list-filters.ts b/src/renderer/features/songs/hooks/use-song-list-filters.ts index dfa6db5cd..757404780 100644 --- a/src/renderer/features/songs/hooks/use-song-list-filters.ts +++ b/src/renderer/features/songs/hooks/use-song-list-filters.ts @@ -28,11 +28,6 @@ export const useSongListFilters = (listKey?: ItemListKey) => { const [searchParams, setSearchParams] = useSearchParams(); - const albumIds = useMemo( - () => parseArrayParam(searchParams, FILTER_KEYS.SONG.ALBUM_IDS), - [searchParams], - ); - const genreId = useMemo( () => parseArrayParam(searchParams, FILTER_KEYS.SONG.GENRE_ID), [searchParams], @@ -63,15 +58,6 @@ export const useSongListFilters = (listKey?: ItemListKey) => { [searchParams], ); - const setAlbumIds = useCallback( - (value: null | string[]) => { - setSearchParams((prev) => setSearchParam(prev, FILTER_KEYS.SONG.ALBUM_IDS, value), { - replace: true, - }); - }, - [setSearchParams], - ); - const setGenreId = useCallback( (value: null | string[]) => { setSearchParams((prev) => setSearchParam(prev, FILTER_KEYS.SONG.GENRE_ID, value), { @@ -153,7 +139,6 @@ export const useSongListFilters = (listKey?: ItemListKey) => { { [FILTER_KEYS.SHARED.SEARCH_TERM]: null, [FILTER_KEYS.SONG._CUSTOM]: null, - [FILTER_KEYS.SONG.ALBUM_IDS]: null, [FILTER_KEYS.SONG.ARTIST_IDS]: null, [FILTER_KEYS.SONG.FAVORITE]: null, [FILTER_KEYS.SONG.GENRE_ID]: null, @@ -172,31 +157,18 @@ export const useSongListFilters = (listKey?: ItemListKey) => { [FILTER_KEYS.SHARED.SORT_BY]: sortBy ?? undefined, [FILTER_KEYS.SHARED.SORT_ORDER]: sortOrder ?? undefined, [FILTER_KEYS.SONG._CUSTOM]: custom ?? undefined, - [FILTER_KEYS.SONG.ALBUM_IDS]: albumIds ?? undefined, [FILTER_KEYS.SONG.ARTIST_IDS]: artistIds ?? undefined, [FILTER_KEYS.SONG.FAVORITE]: favorite ?? undefined, [FILTER_KEYS.SONG.GENRE_ID]: genreId ?? undefined, [FILTER_KEYS.SONG.MAX_YEAR]: maxYear ?? undefined, [FILTER_KEYS.SONG.MIN_YEAR]: minYear ?? undefined, }), - [ - searchTerm, - sortBy, - sortOrder, - custom, - albumIds, - artistIds, - favorite, - genreId, - maxYear, - minYear, - ], + [searchTerm, sortBy, sortOrder, custom, artistIds, favorite, genreId, maxYear, minYear], ); return { clear, query, - setAlbumIds, setArtistIds, setCustom, setFavorite,