Respect deliver_album_cover on player page and scale cover to 160px everywhere
This commit is contained in:
parent
530e9e53ff
commit
8175327ce3
5 changed files with 24 additions and 7 deletions
4
app.py
4
app.py
|
|
@ -540,7 +540,7 @@ def play(token):
|
|||
max_revisions = get_max_revisions()
|
||||
revisions_left = max(0, max_revisions - int(req.get('revision_count') or 0))
|
||||
|
||||
return render_template('player.html', req=req, revisions_left=revisions_left)
|
||||
return render_template('player.html', req=req, revisions_left=revisions_left, deliver_album_cover=load_booth_settings().get('deliver_album_cover', False))
|
||||
|
||||
|
||||
@app.route('/play/<token>/approve', methods=['POST'])
|
||||
|
|
@ -1215,7 +1215,7 @@ def admin_request(rid):
|
|||
attachments.append((str(p), p.name))
|
||||
cfg = load_booth_settings()
|
||||
if cfg.get('deliver_album_cover') and req.get('album_cover_url'):
|
||||
cover_path = download_album_cover(rid, req['album_cover_url'])
|
||||
cover_path = download_album_cover(rid, req['album_cover_url'], max_width=160)
|
||||
if cover_path:
|
||||
attachments.append((cover_path, f"cover{Path(cover_path).suffix}"))
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue