mirror of
https://github.com/antebudimir/feishin.git
synced 2026-01-02 10:53:33 +00:00
handle playback on new artist list
This commit is contained in:
parent
b9611589ba
commit
4a3604b1a8
12 changed files with 121 additions and 31 deletions
|
|
@ -20,6 +20,7 @@ import {
|
|||
getAlbumArtistSongsById,
|
||||
getSongsByQuery,
|
||||
getGenreSongsById,
|
||||
getArtistSongsById,
|
||||
} from '/@/renderer/features/player/utils';
|
||||
import { queryKeys } from '/@/renderer/api/query-keys';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
|
|
@ -75,6 +76,8 @@ export const useHandlePlayQueueAdd = () => {
|
|||
let songs: QueueSong[] | null = null;
|
||||
let initialSongIndex = 0;
|
||||
|
||||
console.log('options :>> ', options);
|
||||
|
||||
if (byItemType) {
|
||||
let songList: SongListResponse | undefined;
|
||||
const { type: itemType, id } = byItemType;
|
||||
|
|
@ -119,6 +122,13 @@ export const useHandlePlayQueueAdd = () => {
|
|||
queryClient,
|
||||
server,
|
||||
});
|
||||
} else if (itemType === LibraryItem.ARTIST) {
|
||||
songList = await getArtistSongsById({
|
||||
id,
|
||||
query,
|
||||
queryClient,
|
||||
server,
|
||||
});
|
||||
} else if (itemType === LibraryItem.GENRE) {
|
||||
songList = await getGenreSongsById({ id, query, queryClient, server });
|
||||
} else if (itemType === LibraryItem.SONG) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue