mirror of
https://codeberg.org/lucida/lucida.git
synced 2026-11-17 09:07:28 -05:00
fix bugs
This commit is contained in:
@@ -167,7 +167,7 @@ export default class Qobuz implements StreamerWithLogin {
|
|||||||
await this.#getSigned('track/getFileUrl', params)
|
await this.#getSigned('track/getFileUrl', params)
|
||||||
)
|
)
|
||||||
if (trackFileResponse.sample == true)
|
if (trackFileResponse.sample == true)
|
||||||
throw new Error(`Could not get non-sample file. Make sure the track isn't download-only.`)
|
throw new Error(`Could not get non-sample file. Make sure the track isn't purchase-only.`)
|
||||||
const streamResponse = await fetch(trackFileResponse.url)
|
const streamResponse = await fetch(trackFileResponse.url)
|
||||||
return {
|
return {
|
||||||
mimeType: trackFileResponse.mime_type,
|
mimeType: trackFileResponse.mime_type,
|
||||||
|
|||||||
@@ -138,6 +138,8 @@ export default class Soundcloud implements Streamer {
|
|||||||
const type = await this.getTypeFromUrl(url)
|
const type = await this.getTypeFromUrl(url)
|
||||||
const client = this.client || (await this.#getClient())
|
const client = this.client || (await this.#getClient())
|
||||||
|
|
||||||
|
url = url.replace('//m.', '//')
|
||||||
|
|
||||||
// getting the IDs and track authorization
|
// getting the IDs and track authorization
|
||||||
const html = await (await fetch(url, { method: 'get', headers: headers() })).text()
|
const html = await (await fetch(url, { method: 'get', headers: headers() })).text()
|
||||||
|
|
||||||
|
|||||||
@@ -105,7 +105,7 @@ export function parseTrack(raw: RawTrack): Track {
|
|||||||
album: parseAlbum(raw.album)
|
album: parseAlbum(raw.album)
|
||||||
}
|
}
|
||||||
if (raw.producers) track.producers = raw.producers
|
if (raw.producers) track.producers = raw.producers
|
||||||
if (raw.composers) track.composers = raw.composers
|
if (raw.composers && raw.composers[0] != 'Not Documented') track.composers = raw.composers
|
||||||
if (raw.lyricists) track.lyricists = raw.lyricists
|
if (raw.lyricists) track.lyricists = raw.lyricists
|
||||||
if (raw.isrc) track.isrc = raw.isrc
|
if (raw.isrc) track.isrc = raw.isrc
|
||||||
if (raw.copyright) track.copyright = raw.copyright
|
if (raw.copyright) track.copyright = raw.copyright
|
||||||
|
|||||||
Reference in New Issue
Block a user