format and lint

This commit is contained in:
aria
2024-07-29 14:59:09 -04:00
parent d48482abac
commit 1803afcbab

View File

@@ -152,9 +152,8 @@ export default class Deezer implements StreamerWithLogin {
} }
async login(username: string, password: string): Promise<void> { async login(username: string, password: string): Promise<void> {
if (this.arl) { if (this.arl) await this.#loginViaArl(this.arl)
await this.#loginViaArl(this.arl) else {
} else {
const resp = await fetch('https://www.deezer.com/', { headers: this.headers }) const resp = await fetch('https://www.deezer.com/', { headers: this.headers })
const setCookie = resp.headers.get('Set-Cookie') ?? '' const setCookie = resp.headers.get('Set-Cookie') ?? ''
const sid = setCookie.match(/sid=(fr[0-9a-f]+)/)![1] const sid = setCookie.match(/sid=(fr[0-9a-f]+)/)![1]