mirror of
https://github.com/jiojciojsioe3/a3cjroijsiojiorj.git
synced 2024-11-25 20:31:51 +08:00
use songs_baseurl when returning preview url
This commit is contained in:
parent
7f6f95cbce
commit
7b9de52d06
4
app.py
4
app.py
@ -153,9 +153,9 @@ def route_api_preview():
|
|||||||
song_type = song_row[0][12]
|
song_type = song_row[0][12]
|
||||||
prev_path = make_preview(song_id, song_type)
|
prev_path = make_preview(song_id, song_type)
|
||||||
if not prev_path:
|
if not prev_path:
|
||||||
return redirect(urlparse.urljoin(request.host_url, '/songs/%s/main.mp3' % song_id))
|
return redirect(get_config()['songs_baseurl'] + '%s/main.mp3' % song_id)
|
||||||
|
|
||||||
return redirect(urlparse.urljoin(request.host_url, '/songs/%s/preview.mp3' % song_id))
|
return redirect(get_config()['songs_baseurl'] + '%s/preview.mp3' % song_id)
|
||||||
|
|
||||||
|
|
||||||
@app.route('/api/songs')
|
@app.route('/api/songs')
|
||||||
|
Loading…
Reference in New Issue
Block a user