mirror of
https://github.com/antebudimir/feishin.git
synced 2026-01-03 03:11:40 +00:00
Improve genres for jellyfin
- Support music folder - Add images - Fix genre filters on album/track filters
This commit is contained in:
parent
3f813b1a26
commit
7c59722f0a
11 changed files with 163 additions and 51 deletions
|
|
@ -1,5 +1,6 @@
|
|||
import type { AgGridReact as AgGridReactType } from '@ag-grid-community/react/lib/agGridReact';
|
||||
import { useCallback, useMemo, useRef } from 'react';
|
||||
import type { AgGridReact as AgGridReactType } from '@ag-grid-community/react/lib/agGridReact';
|
||||
import isEmpty from 'lodash/isEmpty';
|
||||
import { useParams, useSearchParams } from 'react-router-dom';
|
||||
import { GenreListSort, LibraryItem, SongListQuery, SortOrder } from '/@/renderer/api/types';
|
||||
import { ListContext } from '/@/renderer/context/list-context';
|
||||
|
|
@ -21,8 +22,8 @@ const TrackListRoute = () => {
|
|||
|
||||
const pageKey = albumArtistId ? `albumArtistSong` : 'song';
|
||||
|
||||
const customFilters: Partial<SongListQuery> = useMemo(() => {
|
||||
return {
|
||||
const customFilters = useMemo(() => {
|
||||
const value = {
|
||||
...(albumArtistId && { artistIds: [albumArtistId] }),
|
||||
...(genreId && {
|
||||
_custom: {
|
||||
|
|
@ -35,6 +36,12 @@ const TrackListRoute = () => {
|
|||
},
|
||||
}),
|
||||
};
|
||||
|
||||
if (isEmpty(value)) {
|
||||
return undefined;
|
||||
}
|
||||
|
||||
return value;
|
||||
}, [albumArtistId, genreId]);
|
||||
|
||||
const handlePlayQueueAdd = usePlayQueueAdd();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue