dont play underage music concurrently with event music

master
Aevann 2024-10-14 14:15:16 +03:00
parent dfb3fbbbdd
commit bc60ca8991
2 changed files with 2 additions and 2 deletions

View File

@ -39,7 +39,7 @@ def error(e):
if request.headers.get("Authorization") or request.headers.get("xhr"):
return {"error": title, "code": e.code, "description": msg, "details": details}, e.code
img = ERROR_MARSEYS.get(e.code, 'marseyl')
return render_template('errors/error.html', err=True, title=title, msg=msg, details=details, img=img, code=e.code), e.code
return render_template('errors/error.html', err=e.code, title=title, msg=msg, details=details, img=img, code=e.code), e.code
@app.errorhandler(401)
def error_401(e):

View File

@ -139,7 +139,7 @@
{% endif %}
{% endif %}
{% if IS_MUSICAL_EVENT() and not (SITE_NAME == 'WPD' and not v) and (not v or v.event_music) and not (hole and hole.name == 'music') and not (u and u.song) and not (IS_HOMOWEEN() and p and p.award_count("haunt", v)) and not (p and p.embed and p.domain == 'x.com') %}
{% if IS_MUSICAL_EVENT() and not (SITE_NAME == 'WPD' and not v) and (not v or v.event_music) and not (hole and hole.name == 'music') and not (u and u.song) and not (IS_HOMOWEEN() and p and p.award_count("haunt", v)) and not (p and p.embed and p.domain == 'x.com') and err != 406 %}
{% set path = "assets/events/" ~ IS_EVENT() ~ "/music" %}
{% set song = SITE_FULL ~ "/" ~ path ~ "/" ~ listdir('files/'~path)|seeded_random(id) ~ '?x=45' %}
<audio id="event-song" hidden preload="none" src="{{song}}" loop></audio>