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",
|
"name": "lucida",
|
||||||
"version": "2.0.0-50",
|
"version": "2.0.0-51",
|
||||||
"description": "A modular music downloader tool",
|
"description": "A modular music downloader tool",
|
||||||
"main": "build/index.js",
|
"main": "build/index.js",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
|
|||||||
@ -278,20 +278,23 @@ export default class Soundcloud implements Streamer {
|
|||||||
return { ...api, id }
|
return { ...api, id }
|
||||||
}
|
}
|
||||||
async getAccountInfo(): Promise<StreamerAccount> {
|
async getAccountInfo(): Promise<StreamerAccount> {
|
||||||
|
if (!this.oauthToken) return { valid: false }
|
||||||
|
|
||||||
const client = this.client || (await this.#getClient())
|
const client = this.client || (await this.#getClient())
|
||||||
const subscriptionQuery = <SoundCloudSubscriptionData>await (
|
const response = await fetch(
|
||||||
await fetch(
|
this.#formatURL(
|
||||||
this.#formatURL(
|
`https://api-v2.soundcloud.com/payments/quotations/consumer-subscription`,
|
||||||
`https://api-v2.soundcloud.com/payments/quotations/consumer-subscription`,
|
client
|
||||||
client
|
),
|
||||||
),
|
{
|
||||||
{
|
method: 'get',
|
||||||
method: 'get',
|
headers: headers(this.oauthToken),
|
||||||
headers: headers(this.oauthToken),
|
dispatcher: this.dispatcher
|
||||||
dispatcher: this.dispatcher
|
}
|
||||||
}
|
)
|
||||||
)
|
if (response.status != 200) return { valid: false }
|
||||||
).json()
|
|
||||||
|
const subscriptionQuery = <SoundCloudSubscriptionData>await response.json()
|
||||||
|
|
||||||
return {
|
return {
|
||||||
valid: true,
|
valid: true,
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user