mirror of
https://git.gay/lucida/lucida
synced 2025-12-11 20:15:14 +01:00
fix soundcloud account validation, bump version
This commit is contained in:
parent
b6a9ac9ca3
commit
29719ef5d9
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "lucida",
|
||||
"version": "2.0.0-50",
|
||||
"version": "2.0.0-51",
|
||||
"description": "A modular music downloader tool",
|
||||
"main": "build/index.js",
|
||||
"type": "module",
|
||||
|
||||
@ -278,20 +278,23 @@ export default class Soundcloud implements Streamer {
|
||||
return { ...api, id }
|
||||
}
|
||||
async getAccountInfo(): Promise<StreamerAccount> {
|
||||
if (!this.oauthToken) return { valid: false }
|
||||
|
||||
const client = this.client || (await this.#getClient())
|
||||
const subscriptionQuery = <SoundCloudSubscriptionData>await (
|
||||
await fetch(
|
||||
this.#formatURL(
|
||||
`https://api-v2.soundcloud.com/payments/quotations/consumer-subscription`,
|
||||
client
|
||||
),
|
||||
{
|
||||
method: 'get',
|
||||
headers: headers(this.oauthToken),
|
||||
dispatcher: this.dispatcher
|
||||
}
|
||||
)
|
||||
).json()
|
||||
const response = await fetch(
|
||||
this.#formatURL(
|
||||
`https://api-v2.soundcloud.com/payments/quotations/consumer-subscription`,
|
||||
client
|
||||
),
|
||||
{
|
||||
method: 'get',
|
||||
headers: headers(this.oauthToken),
|
||||
dispatcher: this.dispatcher
|
||||
}
|
||||
)
|
||||
if (response.status != 200) return { valid: false }
|
||||
|
||||
const subscriptionQuery = <SoundCloudSubscriptionData>await response.json()
|
||||
|
||||
return {
|
||||
valid: true,
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user