Skip to content

Commit 1703705

Browse files
authored
Update audius.js
Signed-off-by: AV <134554554+southctrl@users.noreply.github.com>
1 parent 14b4bd9 commit 1703705

File tree

1 file changed

+20
-2
lines changed

1 file changed

+20
-2
lines changed

src/sources/audius.js

Lines changed: 20 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,14 @@
1+
/*
2+
* .___ ___. __ .__ __ .__
3+
* _____ _____ __| _/____ \_ |__ ___.__. __________ __ ___/ |_| |__ _____/ |________| |
4+
* / \\__ \ / __ |/ __ \ | __ < | | / ___/ _ \| | \ __\ | \_/ ___\ __\_ __ \ |
5+
* | Y Y \/ __ \_/ /_/ \ ___/ | \_\ \___ | \___ ( <_> ) | /| | | Y \ \___| | | | \/ |__
6+
* |__|_| (____ /\____ |\___ > |___ / ____| /____ >____/|____/ |__| |___| /\___ >__| |__| |____/
7+
* \/ \/ \/ \/ \/\/ \/ \/ \/
8+
* My github profile: https://github.com/southctrl
9+
* You're welcome for another source :) <3 - SouthCtrl
10+
*/
11+
112
import { encodeTrack, http1makeRequest, logger } from '../utils.js'
213

314
const AUDIUS_API_BASE = 'https://discoveryprovider.audius.co'
@@ -329,7 +340,10 @@ export default class AudiusSource {
329340
const tracksEndpoint = `/v1/users/${user.id}/tracks?limit=50`
330341
const tracksData = await this._apiRequest(tracksEndpoint)
331342

332-
if (!tracksData || (Array.isArray(tracksData) && tracksData.length === 0)) {
343+
if (
344+
!tracksData ||
345+
(Array.isArray(tracksData) && tracksData.length === 0)
346+
) {
333347
return this._createExceptionResponse('Artist has no tracks.', 'common')
334348
}
335349

@@ -501,7 +515,11 @@ export default class AudiusSource {
501515
if (this.apiKey) url.searchParams.set('apiKey', this.apiKey)
502516

503517
const streamUrl = url.toString()
504-
logger('debug', 'Audius', `Built stream URL for track ${trackId}: ${streamUrl}`)
518+
logger(
519+
'debug',
520+
'Audius',
521+
`Built stream URL for track ${trackId}: ${streamUrl}`
522+
)
505523

506524
return streamUrl
507525
} catch (e) {

0 commit comments

Comments
 (0)