mirror of
https://github.com/austinried/subtracks.git
synced 2026-02-10 15:02:42 +01:00
swtiched back to 2 sizes for images
siwtched to Image for now to avoid double caching from FastImage
This commit is contained in:
39
app/models/cache.ts
Normal file
39
app/models/cache.ts
Normal file
@@ -0,0 +1,39 @@
|
||||
import { Album, PlaylistListItem, Artist, Song } from './music'
|
||||
|
||||
export enum CacheItemType {
|
||||
coverArt = 'coverArt',
|
||||
coverArtThumb = 'coverArtThumb',
|
||||
artistArt = 'artistArt',
|
||||
artistArtThumb = 'artistArtThumb',
|
||||
song = 'song',
|
||||
}
|
||||
|
||||
export type CacheItemTypeKey = keyof typeof CacheItemType
|
||||
|
||||
export type CacheImageSize = 'thumbnail' | 'original'
|
||||
|
||||
export type CacheFile = {
|
||||
path: string
|
||||
date: number
|
||||
permanent: boolean
|
||||
}
|
||||
|
||||
export type CacheRequest = {
|
||||
progress: number
|
||||
promise?: Promise<void>
|
||||
}
|
||||
|
||||
export type DownloadedAlbum = Album & {
|
||||
songs: string[]
|
||||
}
|
||||
|
||||
export type DownloadedPlaylist = PlaylistListItem & {
|
||||
songs: string[]
|
||||
}
|
||||
|
||||
export type DownloadedArtist = Artist & {
|
||||
topSongs: string[]
|
||||
albums: string[]
|
||||
}
|
||||
|
||||
export type DownloadedSong = Song
|
||||
@@ -8,6 +8,7 @@ export interface Artist {
|
||||
|
||||
export interface ArtistInfo extends Artist {
|
||||
albums: Album[]
|
||||
smallImageUrl?: string
|
||||
largeImageUrl?: string
|
||||
topSongs: Song[]
|
||||
}
|
||||
@@ -70,37 +71,3 @@ export type ListableItem = Song | AlbumListItem | Artist | PlaylistListItem
|
||||
export type HomeLists = { [key: string]: AlbumListItem[] }
|
||||
|
||||
export type StarrableItemType = 'song' | 'album' | 'artist'
|
||||
|
||||
export enum CacheItemType {
|
||||
coverArt = 'coverArt',
|
||||
artistArt = 'artistArt',
|
||||
song = 'song',
|
||||
}
|
||||
|
||||
export type CacheItemTypeKey = keyof typeof CacheItemType
|
||||
|
||||
export type CacheFile = {
|
||||
path: string
|
||||
date: number
|
||||
permanent: boolean
|
||||
}
|
||||
|
||||
export type CacheRequest = {
|
||||
progress: number
|
||||
promise?: Promise<void>
|
||||
}
|
||||
|
||||
export type DownloadedAlbum = Album & {
|
||||
songs: string[]
|
||||
}
|
||||
|
||||
export type DownloadedPlaylist = PlaylistListItem & {
|
||||
songs: string[]
|
||||
}
|
||||
|
||||
export type DownloadedArtist = Artist & {
|
||||
topSongs: string[]
|
||||
albums: string[]
|
||||
}
|
||||
|
||||
export type DownloadedSong = Song
|
||||
|
||||
Reference in New Issue
Block a user