mirror of
https://github.com/GiriNeko/YesPlayMusic.git
synced 2025-12-16 21:28:06 +00:00
feat: updates
This commit is contained in:
parent
196a974a64
commit
8f4c3d8e5b
24 changed files with 572 additions and 93 deletions
|
|
@ -21,7 +21,6 @@ export const enum APIs {
|
|||
Album = 'album',
|
||||
Artist = 'artists',
|
||||
ArtistAlbum = 'artist/album',
|
||||
CoverColor = 'cover_color',
|
||||
Likelist = 'likelist',
|
||||
Lyric = 'lyric',
|
||||
Personalized = 'personalized',
|
||||
|
|
@ -33,13 +32,16 @@ export const enum APIs {
|
|||
UserAlbums = 'album/sublist',
|
||||
UserArtists = 'artist/sublist',
|
||||
UserPlaylist = 'user/playlist',
|
||||
|
||||
// not netease api
|
||||
CoverColor = 'cover_color',
|
||||
VideoCover = 'video_cover',
|
||||
}
|
||||
|
||||
export interface APIsParams {
|
||||
[APIs.Album]: { id: number }
|
||||
[APIs.Artist]: { id: number }
|
||||
[APIs.ArtistAlbum]: { id: number }
|
||||
[APIs.CoverColor]: { id: number }
|
||||
[APIs.Likelist]: void
|
||||
[APIs.Lyric]: { id: number }
|
||||
[APIs.Personalized]: void
|
||||
|
|
@ -51,13 +53,14 @@ export interface APIsParams {
|
|||
[APIs.UserAlbums]: void
|
||||
[APIs.UserArtists]: void
|
||||
[APIs.UserPlaylist]: void
|
||||
[APIs.CoverColor]: { id: number }
|
||||
[APIs.VideoCover]: { id: number }
|
||||
}
|
||||
|
||||
export interface APIsResponse {
|
||||
[APIs.Album]: FetchAlbumResponse
|
||||
[APIs.Artist]: FetchArtistResponse
|
||||
[APIs.ArtistAlbum]: FetchArtistAlbumsResponse
|
||||
[APIs.CoverColor]: string | undefined
|
||||
[APIs.Likelist]: FetchUserLikedTracksIDsResponse
|
||||
[APIs.Lyric]: FetchLyricResponse
|
||||
[APIs.Personalized]: FetchRecommendedPlaylistsResponse
|
||||
|
|
@ -69,4 +72,6 @@ export interface APIsResponse {
|
|||
[APIs.UserAlbums]: FetchUserAlbumsResponse
|
||||
[APIs.UserArtists]: FetchUserArtistsResponse
|
||||
[APIs.UserPlaylist]: FetchUserPlaylistsResponse
|
||||
[APIs.CoverColor]: string | undefined
|
||||
[APIs.VideoCover]: string | undefined
|
||||
}
|
||||
|
|
|
|||
|
|
@ -23,6 +23,8 @@ export const enum IpcChannels {
|
|||
SyncSettings = 'SyncSettings',
|
||||
GetAudioCacheSize = 'GetAudioCacheSize',
|
||||
ResetWindowSize = 'ResetWindowSize',
|
||||
GetVideoCover = 'GetVideoCover',
|
||||
SetVideoCover = 'SetVideoCover',
|
||||
}
|
||||
|
||||
// ipcMain.on params
|
||||
|
|
@ -58,6 +60,8 @@ export interface IpcChannelsParams {
|
|||
[IpcChannels.SyncSettings]: Store['settings']
|
||||
[IpcChannels.GetAudioCacheSize]: void
|
||||
[IpcChannels.ResetWindowSize]: void
|
||||
[IpcChannels.GetVideoCover]: { id: number }
|
||||
[IpcChannels.SetVideoCover]: { id: number; url: string }
|
||||
}
|
||||
|
||||
// ipcRenderer.on params
|
||||
|
|
@ -79,4 +83,6 @@ export interface IpcChannelsReturns {
|
|||
[IpcChannels.Like]: void
|
||||
[IpcChannels.Repeat]: RepeatMode
|
||||
[IpcChannels.GetAudioCacheSize]: void
|
||||
[IpcChannels.GetVideoCover]: string | undefined
|
||||
[IpcChannels.SetVideoCover]: void
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue