mirror of
https://codeberg.org/lucida/lucida.git
synced 2026-11-16 16:47:31 -05:00
start deezer work
This commit is contained in:
@@ -1,6 +1,172 @@
|
||||
export const GW_LIGHT_URL = 'https://www.deezer.com/ajax/gw-light.php'
|
||||
export const CLIENT_ID = '447462'
|
||||
export const CLIENT_SECRET = 'a83bf7f38ad2f137e444727cfc3775cf'
|
||||
export const SIZES = [256, 512, 1024, 1200]
|
||||
export const AcceptableAlbumTypes = ['upc']
|
||||
export const AcceptableTrackTypes = ['isrc']
|
||||
|
||||
export const BLOWFISH_SECRET = 'g4el58wc0zvf9na1'
|
||||
export const UPC = `https://api.deezer.com/album/upc:{upc}?limit=100`
|
||||
export const ISRC = `https://api.deezer.com/track/isrc:{upc}`
|
||||
|
||||
export type RawUPCAlbum = {
|
||||
id: number
|
||||
title: string
|
||||
upc: string
|
||||
link: string
|
||||
share: string
|
||||
cover: string
|
||||
cover_small: string
|
||||
cover_medium: string
|
||||
cover_big: string
|
||||
cover_xl: string
|
||||
md5_image: string
|
||||
genre_id: number
|
||||
genres: {
|
||||
data: Genre[]
|
||||
}
|
||||
label: string
|
||||
nb_tracks: number
|
||||
duration: number
|
||||
fans: number
|
||||
release_date: string
|
||||
available: boolean
|
||||
tracklist: string
|
||||
explicit_lyrics: boolean
|
||||
explicit_contents_lyrics: number
|
||||
explicit_contents_cover: number
|
||||
contributors: Contributor[]
|
||||
artist: ArtistFromAlbumUPC
|
||||
type: 'album'
|
||||
tracks: { data: TrackWithinUPCAlbum[] }
|
||||
}
|
||||
|
||||
type Genre = {
|
||||
id: number
|
||||
name: string
|
||||
picture: string
|
||||
type: 'genre'
|
||||
}
|
||||
|
||||
type Contributor = {
|
||||
id: number
|
||||
name: string
|
||||
link: string
|
||||
share: string
|
||||
picture: string
|
||||
picture_small: string
|
||||
picture_medium: string
|
||||
picture_big: string
|
||||
picture_xl: string
|
||||
radio: boolean
|
||||
tracklist: string
|
||||
type: 'artist'
|
||||
role: 'Main'
|
||||
}
|
||||
|
||||
type ArtistFromAlbumUPC = {
|
||||
id: number
|
||||
name: string
|
||||
picture: string
|
||||
picture_small: string
|
||||
picture_medium: string
|
||||
picture_big: string
|
||||
picture_xl: string
|
||||
tracklist: string
|
||||
type: 'artist'
|
||||
}
|
||||
|
||||
type TrackWithinUPCAlbum = {
|
||||
id: number
|
||||
readable: boolean
|
||||
title: string
|
||||
title_short: string
|
||||
title_version: ''
|
||||
link: string
|
||||
duration: number
|
||||
rank: number
|
||||
explicit_lyrics: boolean
|
||||
explicit_content_lyrics: number
|
||||
explicit_content_cover: number
|
||||
preview: string
|
||||
md5_image: string
|
||||
artist: {
|
||||
id: number
|
||||
name: string
|
||||
tracklist: string
|
||||
type: 'artist'
|
||||
}
|
||||
album: {
|
||||
id: number
|
||||
title: string
|
||||
over: string
|
||||
cover_small: string
|
||||
cover_medium: string
|
||||
cover_big: string
|
||||
cover_xl: string
|
||||
md5_image: string
|
||||
tracklist: string
|
||||
type: 'album'
|
||||
}
|
||||
type: 'track'
|
||||
}
|
||||
|
||||
export type RawISRCTrack = {
|
||||
id: number
|
||||
readable: boolean
|
||||
title: string
|
||||
title_short: string
|
||||
title_version: string
|
||||
isrc: string
|
||||
link: string
|
||||
share: string
|
||||
duration: number
|
||||
track_position: number
|
||||
disk_number: number
|
||||
rank: number
|
||||
release_date: string
|
||||
explicit_lyrics: boolean
|
||||
explicit_content_lyrics: number
|
||||
explicit_content_cover: number
|
||||
preview: string
|
||||
bpm: number
|
||||
gain: number
|
||||
available_countries: string[] // is there a better way to do this?
|
||||
contributors: Contributor[]
|
||||
md5_image: string
|
||||
track_token: string
|
||||
artist: ArtistFromTrackISRC
|
||||
album: AlbumFromTrackISRC
|
||||
type: 'track'
|
||||
}
|
||||
|
||||
type ArtistFromTrackISRC = {
|
||||
id: number
|
||||
name: string
|
||||
picture: string
|
||||
picture_small: string
|
||||
picture_medium: string
|
||||
picture_big: string
|
||||
picture_xl: string
|
||||
radio: boolean
|
||||
tracklist: string
|
||||
type: 'artist'
|
||||
}
|
||||
|
||||
type AlbumFromTrackISRC = {
|
||||
id: number
|
||||
title: string
|
||||
link: string
|
||||
cover: string
|
||||
cover_small: string
|
||||
cover_medium: string
|
||||
cover_big: string
|
||||
cover_xl: string
|
||||
md5_image: string
|
||||
release_date: string
|
||||
tracklist: string
|
||||
type: 'album'
|
||||
}
|
||||
|
||||
export type RawError = {
|
||||
error: {
|
||||
type: string
|
||||
message: string
|
||||
code: number
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user