Files
Bridge-Multi/src-shared/interfaces/download.interface.ts
Geomitron 353994b8e1 - Update API
- Add Chart Preview
- Add Drum Type dropdown when the "drums" instrument is selected
- Add Min/Max Year to advanced search
- Add Track Hash to advanced search
- Add "Download Video Backgrounds" setting
- Updated and improved detected chart issues
2024-07-16 15:20:58 -05:00

30 lines
853 B
TypeScript

/**
* Represents a user's request to interact with the download system.
*/
export interface Download {
action: 'add' | 'remove' | 'retry'
md5: string
// Should be defined if action === 'add'
hasVideoBackground?: boolean
chart?: { name: string; artist: string; album: string; genre: string; year: string; charter: string }
}
/**
* Represents the download progress of a single chart.
*/
export interface DownloadProgress {
md5: string
chart: { name: string; artist: string; album: string; genre: string; year: string; charter: string }
header: string
body: string
percent: number | null
type: ProgressType
/** If `body` contains a filepath that can be clicked */
isPath: boolean
/** If the download should not appear in the total download progress */
stale?: boolean
}
export type ProgressType = 'good' | 'error' | 'done' | 'cancel'