mirror of
https://github.com/Myxelium/Bridge-Multi.git
synced 2026-07-09 11:35:08 +00:00
Various refactoring
This commit is contained in:
@@ -1,11 +1,14 @@
|
||||
/**
|
||||
* Represents a user's request to interact with the download system.
|
||||
*/
|
||||
export interface Download {
|
||||
action: 'add' | 'retry' | 'continue' | 'cancel'
|
||||
versionID: number
|
||||
data ?: NewDownload
|
||||
data?: NewDownload // Should be defined if action == 'add'
|
||||
}
|
||||
|
||||
/**
|
||||
* Contains the data required to start downloading a single chart
|
||||
* Contains the data required to start downloading a single chart.
|
||||
*/
|
||||
export interface NewDownload {
|
||||
avTagName: string
|
||||
@@ -15,7 +18,7 @@ export interface NewDownload {
|
||||
}
|
||||
|
||||
/**
|
||||
* Represents the download progress of a single chart
|
||||
* Represents the download progress of a single chart.
|
||||
*/
|
||||
export interface DownloadProgress {
|
||||
versionID: number
|
||||
|
||||
@@ -1,12 +1,21 @@
|
||||
/**
|
||||
* Represents a user's song search query.
|
||||
*/
|
||||
export interface SongSearch {
|
||||
query: string
|
||||
type: SearchType
|
||||
}
|
||||
|
||||
/**
|
||||
* The list of possible search categories.
|
||||
*/
|
||||
export enum SearchType {
|
||||
'Any', 'Name', 'Artist', 'Album', 'Genre', 'Year', 'Charter'
|
||||
}
|
||||
|
||||
/**
|
||||
* Represents a single song search result.
|
||||
*/
|
||||
export interface SongResult {
|
||||
id: number
|
||||
name: string
|
||||
|
||||
@@ -1,7 +1,13 @@
|
||||
/**
|
||||
* The image data for a song's album art.
|
||||
*/
|
||||
export interface AlbumArtResult {
|
||||
art: Buffer
|
||||
}
|
||||
|
||||
/**
|
||||
* Represents a single chart version.
|
||||
*/
|
||||
export interface VersionResult {
|
||||
versionID: number
|
||||
chartID: number
|
||||
|
||||
Reference in New Issue
Block a user