This commit is contained in:
2025-03-01 08:28:19 +00:00
6 changed files with 70 additions and 6 deletions

View File

@@ -162,6 +162,17 @@ def vods(username):
vods = get_user_vods(user_id)
return jsonify(vods)
@stream_bp.route('/vods/all')
def get_all_vods():
"""
Returns data of all VODs by all streamers in a JSON-compatible format
"""
with Database() as db:
vods = db.fetchall("SELECT * FROM vods")
print("Fetched VODs from DB:", vods)
return jsonify(vods)
# RTMP Server Routes
@@ -187,7 +198,7 @@ def init_stream():
# Create necessary directories
username = user_info["username"]
create_user_directories(username)
create_local_directories(username)
return redirect(f"/stream/{username}")
@@ -205,6 +216,7 @@ def publish_stream():
periodically update thumbnail
"""
try:
data = json.loads(request.form.get("data"))
except json.JSONDecodeError as ex: