Some more stuff sort of working, started slideshow stuff

This commit is contained in:
Bradley committed 2025-11-09 21:28:10 -05:00
1 parent d332aca22e
commit 91a973dde2
9 files changed
+175 -2

No files matched your search

@@ -0,0 +1,33 @@
from flask import Blueprint, request, render_template, redirect
from utilities.tools import get_db
configure_stream_bp = Blueprint('configure_stream', __name__, url_prefix='/configure', template_folder='.')
@configure_stream_bp.route('/stream', methods=['GET', 'POST'])
def get_page():
if request.method == "GET":
return render_get()
elif request.method == "POST":
return upload()
def render_get():
return render_template('configure_stream.html'), 200
def upload():
# TODO Input Validation
new_id = get_db().insert(
"media",
["media_name", "media_uri"],
[request.form["buttonName"], request.form["streamURL"]]
)
if request.form.get("fullScreen", False):
get_db().insert(
"media_playback_option",
["media_id", "media_playback_option", "media_playback_option_weight"],
[new_id, "-fs", 1]
)
return redirect("/")