diff --git a/web_server/blueprints/streams.py b/web_server/blueprints/streams.py index 257203b..9c76328 100644 --- a/web_server/blueprints/streams.py +++ b/web_server/blueprints/streams.py @@ -220,8 +220,6 @@ def init_stream(): """ stream_key = request.form.get("name") - print(f"Stream initialization requested in nginx with key: {stream_key}", flush=True) - with Database() as db: # Check if valid stream key and user is allowed to stream user_info = db.fetchone("""SELECT user_id, username, is_live @@ -238,6 +236,8 @@ def init_stream(): # FOR TESTING path_manager.create_user(username) + print(f"Stream initialization requested in nginx with key: {stream_key}", flush=True) + return redirect(username + "/" + path_manager.stream_directory_name) @@ -366,9 +366,9 @@ def end_stream(): end thumbnail generation """ - print("Ending stream", flush=True) - + print("TEST END STREAM") stream_key = request.get_json().get("key") + print(stream_key, flush=True) user_id = None username = None diff --git a/web_server/utils/stream_utils.py b/web_server/utils/stream_utils.py index 41ae263..fd7263e 100644 --- a/web_server/utils/stream_utils.py +++ b/web_server/utils/stream_utils.py @@ -67,7 +67,7 @@ def get_custom_thumbnail_status(user_id: int) -> Optional[dict]: with Database() as db: custom_thumbnail = db.fetchone(""" SELECT custom_thumbnail - FROM users + FROM streams WHERE user_id = ?; """, (user_id,)) return custom_thumbnail