refactored into single method/store

This commit is contained in:
austinried
2021-08-14 16:22:40 +09:00
parent 9cacc4de36
commit a95372fa55
7 changed files with 172 additions and 182 deletions

View File

@@ -80,12 +80,25 @@ export type ListableItem = Song | AlbumListItem | Artist | PlaylistListItem
export type HomeLists = { [key: string]: AlbumListItem[] }
export type CachedFile = {
export enum CacheFileType {
coverArt,
artistArt,
song,
}
export type CacheFileTypeKey = keyof typeof CacheFileType
export type CacheFile = {
path: string
date: number
permanent: boolean
}
export type CacheRequest = {
progress: number
promise?: Promise<void>
}
export type DownloadedAlbum = Album & {
songs: string[]
}