(Proper) Initial commit

This commit is contained in:
Tibo De Peuter 2025-01-05 23:56:55 +01:00
parent 48c0059860
commit 32796e4026
Signed by: tdpeuter
GPG key ID: 38297DE43F75FFE2
19 changed files with 6094 additions and 97 deletions

44
backend/types/queue.ts Normal file
View 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
}