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
a1b0bcf4d3
commit
884f3df41a
198 changed files with 4572 additions and 5336 deletions
|
|
@ -9,7 +9,7 @@ export const enum IpcChannels {
|
|||
Close = 'Close',
|
||||
IsMaximized = 'IsMaximized',
|
||||
FullscreenStateChange = 'FullscreenStateChange',
|
||||
GetApiCacheSync = 'GetApiCacheSync',
|
||||
GetApiCache = 'GetApiCache',
|
||||
DevDbExportJson = 'DevDbExportJson',
|
||||
CacheCoverColor = 'CacheCoverColor',
|
||||
SetTrayTooltip = 'SetTrayTooltip',
|
||||
|
|
@ -26,6 +26,7 @@ export const enum IpcChannels {
|
|||
ResetWindowSize = 'ResetWindowSize',
|
||||
GetAlbumFromAppleMusic = 'GetAlbumFromAppleMusic',
|
||||
GetArtistFromAppleMusic = 'GetArtistFromAppleMusic',
|
||||
Logout = 'Logout',
|
||||
}
|
||||
|
||||
// ipcMain.on params
|
||||
|
|
@ -36,7 +37,7 @@ export interface IpcChannelsParams {
|
|||
[IpcChannels.Close]: void
|
||||
[IpcChannels.IsMaximized]: void
|
||||
[IpcChannels.FullscreenStateChange]: void
|
||||
[IpcChannels.GetApiCacheSync]: {
|
||||
[IpcChannels.GetApiCache]: {
|
||||
api: APIs
|
||||
query?: any
|
||||
}
|
||||
|
|
@ -68,6 +69,7 @@ export interface IpcChannelsParams {
|
|||
artist: string
|
||||
}
|
||||
[IpcChannels.GetArtistFromAppleMusic]: { id: number; name: string }
|
||||
[IpcChannels.Logout]: void
|
||||
}
|
||||
|
||||
// ipcRenderer.on params
|
||||
|
|
@ -78,7 +80,7 @@ export interface IpcChannelsReturns {
|
|||
[IpcChannels.Close]: void
|
||||
[IpcChannels.IsMaximized]: boolean
|
||||
[IpcChannels.FullscreenStateChange]: boolean
|
||||
[IpcChannels.GetApiCacheSync]: any
|
||||
[IpcChannels.GetApiCache]: any
|
||||
[IpcChannels.DevDbExportJson]: void
|
||||
[IpcChannels.CacheCoverColor]: void
|
||||
[IpcChannels.SetTrayTooltip]: void
|
||||
|
|
@ -92,4 +94,5 @@ export interface IpcChannelsReturns {
|
|||
[IpcChannels.GetAudioCacheSize]: void
|
||||
[IpcChannels.GetAlbumFromAppleMusic]: AppleMusicAlbum | undefined
|
||||
[IpcChannels.GetArtistFromAppleMusic]: AppleMusicArtist | undefined
|
||||
[IpcChannels.Logout]: void
|
||||
}
|
||||
|
|
|
|||
15
packages/shared/db/appleMusic.ts
Normal file
15
packages/shared/db/appleMusic.ts
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
export const enum AppleMusicTables {
|
||||
Album = 'Album',
|
||||
Artist = 'Artist',
|
||||
}
|
||||
|
||||
export interface AppleMusicTablesStructures {
|
||||
[AppleMusicTables.Album]: {
|
||||
id: string
|
||||
json: string
|
||||
}
|
||||
[AppleMusicTables.Artist]: {
|
||||
id: string
|
||||
json: string
|
||||
}
|
||||
}
|
||||
44
packages/shared/db/netease.ts
Normal file
44
packages/shared/db/netease.ts
Normal file
|
|
@ -0,0 +1,44 @@
|
|||
export const enum NeteaseTables {
|
||||
AccountData = 'AccountData',
|
||||
Album = 'Album',
|
||||
Artist = 'Artist',
|
||||
ArtistAlbum = 'ArtistAlbum',
|
||||
Audio = 'Audio',
|
||||
Lyric = 'Lyric',
|
||||
Playlist = 'Playlist',
|
||||
Track = 'Track',
|
||||
}
|
||||
interface CommonTableStructure {
|
||||
id: number
|
||||
json: string
|
||||
updatedAt: number
|
||||
}
|
||||
export interface NeteaseTablesStructures {
|
||||
[NeteaseTables.AccountData]: {
|
||||
id: string
|
||||
json: string
|
||||
updatedAt: number
|
||||
}
|
||||
[NeteaseTables.Album]: CommonTableStructure
|
||||
[NeteaseTables.Artist]: CommonTableStructure
|
||||
[NeteaseTables.ArtistAlbum]: CommonTableStructure
|
||||
[NeteaseTables.Audio]: {
|
||||
id: number
|
||||
br: number
|
||||
type: 'mp3' | 'flac' | 'ogg' | 'wav' | 'm4a' | 'aac' | 'unknown' | 'opus'
|
||||
source:
|
||||
| 'unknown'
|
||||
| 'netease'
|
||||
| 'migu'
|
||||
| 'kuwo'
|
||||
| 'kugou'
|
||||
| 'youtube'
|
||||
| 'qq'
|
||||
| 'bilibili'
|
||||
| 'joox'
|
||||
queriedAt: number
|
||||
}
|
||||
[NeteaseTables.Lyric]: CommonTableStructure
|
||||
[NeteaseTables.Playlist]: CommonTableStructure
|
||||
[NeteaseTables.Track]: CommonTableStructure
|
||||
}
|
||||
20
packages/shared/db/replay.ts
Normal file
20
packages/shared/db/replay.ts
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
export const enum ReplayTables {
|
||||
CoverColor = 'CoverColor',
|
||||
AppData = 'AppData',
|
||||
}
|
||||
|
||||
export interface ReplayTableKeys {
|
||||
[ReplayTables.CoverColor]: number
|
||||
[ReplayTables.AppData]: 'appVersion' | 'skippedVersion'
|
||||
}
|
||||
|
||||
export interface ReplayTableStructures {
|
||||
[ReplayTables.CoverColor]: {
|
||||
id: number
|
||||
color: string
|
||||
queriedAt: number
|
||||
}
|
||||
[ReplayTables.AppData]: {
|
||||
value: string
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue