mirror of
https://github.com/GiriNeko/YesPlayMusic.git
synced 2025-12-18 06:07:48 +00:00
feat: updates
This commit is contained in:
parent
fc1c25f404
commit
7b6579e068
48 changed files with 1155 additions and 777 deletions
|
|
@ -1,11 +1,12 @@
|
|||
import { fetchPlaylist } from '@/renderer/api/playlist'
|
||||
import { PlaylistApiNames } from '@/renderer/api/playlist'
|
||||
import type {
|
||||
FetchPlaylistParams,
|
||||
FetchPlaylistResponse,
|
||||
} from '@/renderer/api/playlist'
|
||||
import reactQueryClient from '@/renderer/utils/reactQueryClient'
|
||||
import { IpcChannels } from '@/main/IpcChannelsName'
|
||||
import { IpcChannels } from '@/shared/IpcChannels'
|
||||
import { APIs } from '@/shared/CacheAPIs'
|
||||
import {
|
||||
FetchPlaylistParams,
|
||||
PlaylistApiNames,
|
||||
FetchPlaylistResponse,
|
||||
} from '@/shared/api/Playlists'
|
||||
|
||||
const fetch = (params: FetchPlaylistParams, noCache?: boolean) => {
|
||||
return fetchPlaylist(params, !!noCache)
|
||||
|
|
@ -23,7 +24,7 @@ export default function usePlaylist(
|
|||
refetchOnWindowFocus: true,
|
||||
placeholderData: (): FetchPlaylistResponse | undefined =>
|
||||
window.ipcRenderer?.sendSync(IpcChannels.GetApiCacheSync, {
|
||||
api: 'playlist/detail',
|
||||
api: APIs.Playlist,
|
||||
query: {
|
||||
id: params.id,
|
||||
},
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue