mirror of
https://git.lucida.su/lucida/verdana.git
synced 2026-08-18 21:37:01 +00:00
lint
This commit is contained in:
parent
228a62208a
commit
1761fab9fa
3 changed files with 11 additions and 5 deletions
|
|
@ -9,6 +9,7 @@ export const DEFAULT_HEADERS = {
|
|||
'Sec-Fetch-Mode': 'cors',
|
||||
'Sec-Fetch-Site': 'same-site',
|
||||
'Sec-GPC': '1',
|
||||
'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.132 Safari/537.36'
|
||||
'User-Agent':
|
||||
'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.132 Safari/537.36'
|
||||
}
|
||||
export const SC_VERSION = '1686222762'
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@ import {
|
|||
|
||||
function headers(oauthToken?: string | undefined): HeadersInit {
|
||||
const headers: HeadersInit = DEFAULT_HEADERS
|
||||
if (oauthToken) headers['Authorization'] = 'OAuth ' + oauthToken;
|
||||
if (oauthToken) headers['Authorization'] = 'OAuth ' + oauthToken
|
||||
return headers
|
||||
}
|
||||
|
||||
|
|
@ -38,7 +38,7 @@ export default class Soundcloud implements Streamer {
|
|||
hostnames = ['soundcloud.com', 'm.soundcloud.com', 'www.soundcloud.com']
|
||||
oauthToken?: string
|
||||
constructor(options: SoundcloudOptions) {
|
||||
this.oauthToken = options.oauthToken;
|
||||
this.oauthToken = options.oauthToken
|
||||
}
|
||||
async search(query: string, limit = 20): Promise<SearchResults> {
|
||||
const client = await this.#getClient()
|
||||
|
|
@ -151,7 +151,12 @@ export default class Soundcloud implements Streamer {
|
|||
return {
|
||||
type: 'track',
|
||||
getStream: async () => {
|
||||
return await getStream(api.media.transcodings, api.track_authorization, client, this.oauthToken)
|
||||
return await getStream(
|
||||
api.media.transcodings,
|
||||
api.track_authorization,
|
||||
client,
|
||||
this.oauthToken
|
||||
)
|
||||
},
|
||||
metadata: await parseTrack(api)
|
||||
}
|
||||
|
|
|
|||
|
|
@ -29,7 +29,7 @@ export interface RawArtist {
|
|||
|
||||
export interface Headers {
|
||||
Authorization?: string
|
||||
"User-Agent": string
|
||||
'User-Agent': string
|
||||
}
|
||||
|
||||
export function parseArtist(raw: RawArtist): Artist {
|
||||
|
|
|
|||
Loading…
Reference in a new issue