mirror of
https://github.com/GiriNeko/YesPlayMusic.git
synced 2025-12-17 13:48:02 +00:00
feat: updates
This commit is contained in:
parent
08abf8229f
commit
fb21405bf9
33 changed files with 699 additions and 361 deletions
|
|
@ -1,6 +1,9 @@
|
|||
import { fetchArtistAlbums } from '@/api/artist'
|
||||
import { ArtistApiNames } from '@/api/artist'
|
||||
import type { FetchArtistAlbumsParams } from '@/api/artist'
|
||||
import type {
|
||||
FetchArtistAlbumsParams,
|
||||
FetchArtistAlbumsResponse,
|
||||
} from '@/api/artist'
|
||||
|
||||
export default function useUserAlbums(params: FetchArtistAlbumsParams) {
|
||||
return useQuery(
|
||||
|
|
@ -12,6 +15,13 @@ export default function useUserAlbums(params: FetchArtistAlbumsParams) {
|
|||
{
|
||||
enabled: !!params.id && params.id !== 0,
|
||||
staleTime: 3600000,
|
||||
placeholderData: (): FetchArtistAlbumsResponse =>
|
||||
window.ipcRenderer.sendSync('getApiCacheSync', {
|
||||
api: 'artist/album',
|
||||
query: {
|
||||
id: params.id,
|
||||
},
|
||||
}),
|
||||
}
|
||||
)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue