Fix embedded player
This commit is contained in:
parent
132974959b
commit
50fd01de1a
|
@ -54,8 +54,8 @@
|
|||
const getTracksUrl = () => type === 'track'
|
||||
? `${baseUrl}/api/v1/tracks/${id}`
|
||||
: type === 'playlist'
|
||||
? ${baseUrl}`/api/v1/playlists/${id}/tracks/`
|
||||
: ${baseUrl}`/api/v1/tracks/`
|
||||
? `${baseUrl}/api/v1/playlists/${id}/tracks/`
|
||||
: `${baseUrl}/api/v1/tracks/`
|
||||
|
||||
const getAudioSources = (uploads) => {
|
||||
const sources = uploads
|
||||
|
@ -65,9 +65,9 @@
|
|||
// NOTE: For backwards compatibilty, prepend the baseUrl if listen_url starts with a slash
|
||||
.map(source => ({
|
||||
...source,
|
||||
listen_url: listen_url[0] === '/'
|
||||
? `${baseUrl}${listen_url}`
|
||||
: listen_url
|
||||
listen_url: source.listen_url[0] === '/'
|
||||
? `${baseUrl}${source.listen_url}`
|
||||
: source.listen_url
|
||||
}))
|
||||
|
||||
// NOTE: Add a transcoded MP3 src at the end for browsers
|
||||
|
|
Loading…
Reference in New Issue