mirror of
https://github.com/austinried/subtracks.git
synced 2026-02-10 15:02:42 +01:00
reorg, remove old music slice files
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import { Album, PlaylistListItem, Artist, Song } from './music'
|
||||
import { Album, Playlist, Artist, Song } from './library'
|
||||
|
||||
export enum CacheItemType {
|
||||
coverArt = 'coverArt',
|
||||
@@ -27,7 +27,7 @@ export type DownloadedAlbum = Album & {
|
||||
songs: string[]
|
||||
}
|
||||
|
||||
export type DownloadedPlaylist = PlaylistListItem & {
|
||||
export type DownloadedPlaylist = Playlist & {
|
||||
songs: string[]
|
||||
}
|
||||
|
||||
|
||||
@@ -6,7 +6,12 @@ export interface Artist {
|
||||
coverArt?: string
|
||||
}
|
||||
|
||||
export interface AlbumListItem {
|
||||
export interface ArtistInfo {
|
||||
id: string
|
||||
largeImageUrl?: string
|
||||
}
|
||||
|
||||
export interface Album {
|
||||
itemType: 'album'
|
||||
id: string
|
||||
name: string
|
||||
@@ -14,14 +19,10 @@ export interface AlbumListItem {
|
||||
artistId?: string
|
||||
starred?: Date
|
||||
coverArt?: string
|
||||
}
|
||||
|
||||
export interface Album extends AlbumListItem {
|
||||
coverArt?: string
|
||||
year?: number
|
||||
}
|
||||
|
||||
export interface PlaylistListItem {
|
||||
export interface Playlist {
|
||||
itemType: 'playlist'
|
||||
id: string
|
||||
name: string
|
||||
@@ -41,11 +42,15 @@ export interface Song {
|
||||
discNumber?: number
|
||||
duration?: number
|
||||
starred?: Date
|
||||
|
||||
// streamUri: string
|
||||
coverArt?: string
|
||||
}
|
||||
|
||||
export type ListableItem = Song | AlbumListItem | Artist | PlaylistListItem
|
||||
export interface SearchResults {
|
||||
artists: string[]
|
||||
albums: string[]
|
||||
songs: string[]
|
||||
}
|
||||
|
||||
export type StarrableItemType = 'song' | 'album' | 'artist'
|
||||
export type StarrableItemType = 'album' | 'song' | 'artist'
|
||||
|
||||
export type ListableItem = Album | Song | Artist | Playlist
|
||||
14
app/models/state.ts
Normal file
14
app/models/state.ts
Normal file
@@ -0,0 +1,14 @@
|
||||
export interface ById<T> {
|
||||
[id: string]: T
|
||||
}
|
||||
|
||||
export type OneToMany = ById<string[]>
|
||||
|
||||
export interface OrderedById<T> {
|
||||
byId: ById<T>
|
||||
allIds: string[]
|
||||
}
|
||||
|
||||
export interface PaginatedList {
|
||||
[offset: number]: string[]
|
||||
}
|
||||
Reference in New Issue
Block a user