(Proper) Initial commit
This commit is contained in:
parent
48c0059860
commit
32796e4026
19 changed files with 6094 additions and 97 deletions
44
backend/types/queue.ts
Normal file
44
backend/types/queue.ts
Normal file
|
@ -0,0 +1,44 @@
|
|||
export type Song = {
|
||||
title: string,
|
||||
artist: string,
|
||||
trackCount: number,
|
||||
url: string,
|
||||
source: SongSource,
|
||||
cover?: string
|
||||
}
|
||||
|
||||
export enum SongSource {
|
||||
Spotify = 'spotify',
|
||||
Qobuz = 'qobuz',
|
||||
Unknown = 'unknown'
|
||||
}
|
||||
|
||||
export type QueueItem = {
|
||||
id: string,
|
||||
song: Song,
|
||||
timeout?: number,
|
||||
retries?: number,
|
||||
result?: DownloadResult
|
||||
}
|
||||
|
||||
export type Queue = QueueItem[];
|
||||
export type ProcessingQueue = {
|
||||
item: QueueItem,
|
||||
status: string
|
||||
}[];
|
||||
|
||||
export type DownloadResult = {
|
||||
success: boolean,
|
||||
error?: string
|
||||
}
|
||||
|
||||
export type LucidaOptions = {
|
||||
baseUrl: string,
|
||||
headless: boolean,
|
||||
proxy?: string
|
||||
}
|
||||
|
||||
export const DEFAULT_LUCIDA_OPTIONS: LucidaOptions = {
|
||||
baseUrl: 'https://lucida.to',
|
||||
headless: true
|
||||
}
|
Reference in a new issue