This repository has been archived on 2025-08-08. You can view files and clone it, but you cannot make any changes to it's state, such as pushing and creating new issues, pull requests or comments.
lucida-queue/backend/types/queue.ts

44 lines
770 B
TypeScript

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
}