Release v1.3

This commit is contained in:
2026-01-25 15:57:38 +01:00
parent 47aca9d64d
commit 56760e380d
10 changed files with 370 additions and 5 deletions

View File

@@ -1,6 +1,7 @@
from flask import Blueprint, abort, render_template
from flask import Blueprint, abort, render_template, url_for
from ..models import Display
from ..models import Company, Display
from ..uploads import is_valid_upload_relpath
bp = Blueprint("display", __name__, url_prefix="/display")
@@ -10,4 +11,11 @@ def display_player(token: str):
display = Display.query.filter_by(token=token).first()
if not display:
abort(404)
return render_template("display/player.html", display=display)
overlay_url = None
if display.show_overlay:
company = Company.query.filter_by(id=display.company_id).first()
if company and company.overlay_file_path and is_valid_upload_relpath(company.overlay_file_path):
overlay_url = url_for("static", filename=company.overlay_file_path)
return render_template("display/player.html", display=display, overlay_url=overlay_url)