Release 1.6.1
This commit is contained in:
@@ -303,10 +303,11 @@ def display_playlist(token: str):
|
||||
if not display:
|
||||
abort(404)
|
||||
|
||||
company = Company.query.filter_by(id=display.company_id).first()
|
||||
|
||||
# Optional overlay URL (per-company) when enabled on this display.
|
||||
overlay_src = 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_src = url_for("static", filename=company.overlay_file_path)
|
||||
|
||||
@@ -317,15 +318,16 @@ def display_playlist(token: str):
|
||||
if not ok:
|
||||
return resp
|
||||
|
||||
# Ticker settings are configured per-company; displays can enable/disable individually.
|
||||
ticker_cfg = {
|
||||
"enabled": bool(display.ticker_enabled),
|
||||
"rss_url": display.ticker_rss_url,
|
||||
"color": display.ticker_color,
|
||||
"bg_color": display.ticker_bg_color,
|
||||
"bg_opacity": display.ticker_bg_opacity,
|
||||
"font_family": display.ticker_font_family,
|
||||
"font_size_px": display.ticker_font_size_px,
|
||||
"speed": display.ticker_speed,
|
||||
"rss_url": (company.ticker_rss_url if company else None),
|
||||
"color": (company.ticker_color if company else None),
|
||||
"bg_color": (company.ticker_bg_color if company else None),
|
||||
"bg_opacity": (company.ticker_bg_opacity if company else None),
|
||||
"font_family": (company.ticker_font_family if company else None),
|
||||
"font_size_px": (company.ticker_font_size_px if company else None),
|
||||
"speed": (company.ticker_speed if company else None),
|
||||
}
|
||||
|
||||
# Determine active playlists. If display_playlist has any rows, use those.
|
||||
@@ -432,6 +434,8 @@ def display_ticker(token: str):
|
||||
if not display:
|
||||
abort(404)
|
||||
|
||||
company = Company.query.filter_by(id=display.company_id).first()
|
||||
|
||||
# Enforce concurrent session limit the same way as /playlist.
|
||||
sid = request.args.get("sid")
|
||||
ok, resp = _enforce_and_touch_display_session(display, sid)
|
||||
@@ -441,7 +445,7 @@ def display_ticker(token: str):
|
||||
if not display.ticker_enabled:
|
||||
return jsonify({"enabled": False, "headlines": []})
|
||||
|
||||
rss_url = (display.ticker_rss_url or "").strip()
|
||||
rss_url = ((company.ticker_rss_url if company else None) or "").strip()
|
||||
if not rss_url:
|
||||
return jsonify({"enabled": True, "headlines": []})
|
||||
|
||||
|
||||
Reference in New Issue
Block a user