mirror of
https://github.com/GiriNeko/YesPlayMusic.git
synced 2025-12-18 06:07:48 +00:00
fix: bugs
fix: bugs
This commit is contained in:
parent
1444bbefa2
commit
70d1de0e0f
62 changed files with 368 additions and 284 deletions
|
|
@ -1,7 +1,11 @@
|
|||
import { fetchPlaylist } from '@/api/playlist'
|
||||
import { PlaylistApiNames } from '@/api/playlist'
|
||||
import type { FetchPlaylistParams, FetchPlaylistResponse } from '@/api/playlist'
|
||||
import reactQueryClient from '@/utils/reactQueryClient'
|
||||
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'
|
||||
|
||||
const fetch = (params: FetchPlaylistParams, noCache?: boolean) => {
|
||||
return fetchPlaylist(params, !!noCache)
|
||||
|
|
@ -18,7 +22,7 @@ export default function usePlaylist(
|
|||
enabled: !!(params.id && params.id > 0 && !isNaN(Number(params.id))),
|
||||
refetchOnWindowFocus: true,
|
||||
placeholderData: (): FetchPlaylistResponse | undefined =>
|
||||
window.ipcRenderer?.sendSync('getApiCacheSync', {
|
||||
window.ipcRenderer?.sendSync(IpcChannels.GetApiCacheSync, {
|
||||
api: 'playlist/detail',
|
||||
query: {
|
||||
id: params.id,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue