From 7b9de52d06d204a19b4dfdbef4812951e2e7f670 Mon Sep 17 00:00:00 2001 From: Bui Date: Sat, 2 Feb 2019 07:41:06 +0000 Subject: [PATCH] use songs_baseurl when returning preview url --- app.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app.py b/app.py index e43d7a7..a02491e 100644 --- a/app.py +++ b/app.py @@ -153,9 +153,9 @@ def route_api_preview(): song_type = song_row[0][12] prev_path = make_preview(song_id, song_type) 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')