fix errors, bump version

This commit is contained in:
aria
2024-09-03 17:08:17 -04:00
parent 52ab7f0b37
commit 243be43461
2 changed files with 4 additions and 6 deletions

View File

@@ -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",

View File

@@ -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(), {