mirror of
https://codeberg.org/lucida/lucida.git
synced 2026-11-14 23:57:27 -05:00
fix errors, bump version
This commit is contained in:
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "lucida",
|
"name": "lucida",
|
||||||
"version": "2.0.0-36",
|
"version": "2.0.0-37",
|
||||||
"description": "A modular music downloader tool",
|
"description": "A modular music downloader tool",
|
||||||
"main": "build/index.js",
|
"main": "build/index.js",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
|
|||||||
@@ -212,8 +212,7 @@ export default class Soundcloud implements Streamer {
|
|||||||
api.media.transcodings,
|
api.media.transcodings,
|
||||||
api.track_authorization,
|
api.track_authorization,
|
||||||
client,
|
client,
|
||||||
this.oauthToken,
|
this.oauthToken
|
||||||
path.split('/')[3]
|
|
||||||
)
|
)
|
||||||
},
|
},
|
||||||
metadata: await parseTrack(api)
|
metadata: await parseTrack(api)
|
||||||
@@ -330,8 +329,7 @@ async function getStream(
|
|||||||
transcodings: Array<SoundcloudTranscoding>,
|
transcodings: Array<SoundcloudTranscoding>,
|
||||||
trackAuth: string,
|
trackAuth: string,
|
||||||
client: ScClient,
|
client: ScClient,
|
||||||
oauthToken?: string | undefined,
|
oauthToken?: string | undefined
|
||||||
secretToken?: string | undefined
|
|
||||||
): Promise<GetStreamResponse> {
|
): Promise<GetStreamResponse> {
|
||||||
let filter = transcodings.filter((x) => x.quality == 'hq')
|
let filter = transcodings.filter((x) => x.quality == 'hq')
|
||||||
if (hq == true && filter.length == 0) throw new Error('Could not find HQ format.')
|
if (hq == true && filter.length == 0) throw new Error('Could not find HQ format.')
|
||||||
@@ -343,7 +341,7 @@ async function getStream(
|
|||||||
const transcoding = filter[0]
|
const transcoding = filter[0]
|
||||||
|
|
||||||
let streamUrl = new URL(transcoding.url)
|
let streamUrl = new URL(transcoding.url)
|
||||||
streamUrl.searchParams.append('client_id', client?.id)
|
if (client?.id) streamUrl.searchParams.append('client_id', client?.id)
|
||||||
streamUrl.searchParams.append('track_authorization', trackAuth)
|
streamUrl.searchParams.append('track_authorization', trackAuth)
|
||||||
|
|
||||||
const streamUrlResp = await fetch(streamUrl.toString(), {
|
const streamUrlResp = await fetch(streamUrl.toString(), {
|
||||||
|
|||||||
Reference in New Issue
Block a user