mirror of
https://codeberg.org/lucida/lucida.git
synced 2026-11-17 09:07:28 -05:00
throw proper error for incompatibility on tidal, format qobuz
This commit is contained in:
@@ -263,10 +263,11 @@ export default class Tidal implements Streamer {
|
||||
tracks: tracksResponse.items.map(parseTrack)
|
||||
}
|
||||
}
|
||||
async #getFileUrl(trackId: number | string, quality = 'HI_RES'): Promise<GetStreamResponse> {
|
||||
async #getFileUrl(trackId: number | string, quality = 'LOSSLESS'): Promise<GetStreamResponse> {
|
||||
interface PlaybackInfo {
|
||||
manifest: string
|
||||
manifestMimeType: string
|
||||
audioQuality: 'LOW' | 'HIGH' | 'LOSSLESS' | 'HI_RES'
|
||||
}
|
||||
const playbackInfoResponse = <PlaybackInfo>await this.#get(
|
||||
`tracks/${trackId}/playbackinfopostpaywall/v4`,
|
||||
@@ -277,6 +278,12 @@ export default class Tidal implements Streamer {
|
||||
prefetch: 'false'
|
||||
}
|
||||
)
|
||||
|
||||
if (
|
||||
playbackInfoResponse.audioQuality == 'HIGH' ||
|
||||
playbackInfoResponse.audioQuality == 'LOW'
|
||||
) throw new Error('This ripper is incompatible with AAC codecs formats at the moment.')
|
||||
|
||||
const manifestStr = Buffer.from(playbackInfoResponse.manifest, 'base64').toString('utf-8')
|
||||
interface Manifest {
|
||||
mimeType: string
|
||||
|
||||
Reference in New Issue
Block a user