mirror of
https://github.com/jeffvli/feishin.git
synced 2026-07-25 03:46:29 +02:00
Album radio (#1759)
* added album radio feature --------- Co-authored-by: jeffvli <jeffvictorli@gmail.com>
This commit is contained in:
committed by
GitHub
parent
a78f5803a5
commit
4918b412b2
@@ -6,6 +6,7 @@ import { queryKeys } from '/@/renderer/api/query-keys';
|
||||
import { getOptimizedListCount } from '/@/renderer/api/utils-list-count';
|
||||
import { QueryHookArgs } from '/@/renderer/lib/react-query';
|
||||
import {
|
||||
AlbumRadioQuery,
|
||||
ArtistRadioQuery,
|
||||
GetQueueQuery,
|
||||
ListCountQuery,
|
||||
@@ -15,6 +16,21 @@ import {
|
||||
} from '/@/shared/types/domain-types';
|
||||
|
||||
export const songsQueries = {
|
||||
albumRadio: (args: QueryHookArgs<AlbumRadioQuery>) => {
|
||||
return queryOptions({
|
||||
queryFn: ({ signal }) => {
|
||||
return api.controller.getAlbumRadio({
|
||||
apiClientProps: { serverId: args.serverId, signal },
|
||||
query: {
|
||||
albumId: args.query.albumId,
|
||||
count: args.query.count ?? 20,
|
||||
},
|
||||
});
|
||||
},
|
||||
queryKey: queryKeys.songs.albumRadio(args.serverId, args.query),
|
||||
...args.options,
|
||||
});
|
||||
},
|
||||
artistRadio: (args: QueryHookArgs<ArtistRadioQuery>) => {
|
||||
return queryOptions({
|
||||
queryFn: ({ signal }) => {
|
||||
|
||||
Reference in New Issue
Block a user