Skip to content
Snippets Groups Projects
Commit 72c17c8b authored by ale's avatar ale
Browse files

use urllib sanely

parent 591b7870
No related branches found
No related tags found
No related merge requests found
...@@ -107,8 +107,8 @@ def play_callback(sha1): ...@@ -107,8 +107,8 @@ def play_callback(sha1):
@app.route('/album_image/<artist>/<album>') @app.route('/album_image/<artist>/<album>')
def get_album_image(artist, album): def get_album_image(artist, album):
img_file = album_images.get_album_image( img_file = album_images.get_album_image(
urllib.urlunquote_plus(artist), urllib.unquote(artist),
urllib.urlunquote_plus(album)) urllib.unquote(album))
if not img_file: if not img_file:
abort(404) abort(404)
return send_file(img_file, mimetype='image/jpeg', conditional=True) return send_file(img_file, mimetype='image/jpeg', conditional=True)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment