From 98198893dbbcfb6f3595ca05f01b5049233f1782 Mon Sep 17 00:00:00 2001 From: EvanLin3141 Date: Sat, 1 Mar 2025 01:25:17 +0000 Subject: [PATCH] FIX: Vods Showing Issue --- frontend/src/pages/HomePage.tsx | 3 +-- web_server/blueprints/streams.py | 7 ++++--- web_server/database/app.db | Bin 159744 -> 159744 bytes 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/frontend/src/pages/HomePage.tsx b/frontend/src/pages/HomePage.tsx index 5b79a56..6dadb53 100644 --- a/frontend/src/pages/HomePage.tsx +++ b/frontend/src/pages/HomePage.tsx @@ -1,12 +1,11 @@ import React from "react"; import ListRow from "../components/Layout/ListRow"; import { useNavigate } from "react-router-dom"; -import { useStreams, useCategories } from "../hooks/useContent"; +import { useStreams, useCategories, useVods } from "../hooks/useContent"; import Button from "../components/Input/Button"; import DynamicPageContent from "../components/Layout/DynamicPageContent"; import LoadingScreen from "../components/Layout/LoadingScreen"; import Footer from "../components/Layout/Footer"; -import { useVods } from "../hooks/useContent"; // Import useVods interface HomePageProps { diff --git a/web_server/blueprints/streams.py b/web_server/blueprints/streams.py index 5da0cd3..97fbe0b 100644 --- a/web_server/blueprints/streams.py +++ b/web_server/blueprints/streams.py @@ -162,6 +162,7 @@ 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 @@ -169,11 +170,10 @@ def get_all_vods(): with Database() as db: vods = db.fetchall("SELECT * FROM vods") - print("Fetched VODs from DB:", vods) # ✅ Debugging line + print("Fetched VODs from DB:", vods) return jsonify(vods) - # RTMP Server Routes @stream_bp.route("/init_stream", methods=["POST"]) @@ -198,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}") @@ -216,6 +216,7 @@ def publish_stream(): periodically update thumbnail """ + try: data = json.loads(request.form.get("data")) except json.JSONDecodeError as ex: diff --git a/web_server/database/app.db b/web_server/database/app.db index 09993994269a35b3ce7c17b5e6f179d0fabf4a18..981cb301b012503ba16264d7651d6eac8aa66bce 100644 GIT binary patch delta 200 zcmZp8z}fJCbAmMEwuv&%jN3LQEa7JsW&1LjT|kzPb1tVF$5)P}9G>j&*uHEw6gb4j z+*mF;`M=B$Mv=)sWTO~`C;LlBGYU;!FXzuFIQhR^0HeU<0QoRR{>jVbBY|r9Kx#LC zmSQyJ;o@Xu7H2FiPAw`HU8JC}seomI1Q#D41OHk6Is7^N*8J>zSNIn574tdq@og4V z_{7U(#5J9hpV63+bGj`*qX8qw^gMn>eMa`_^FTbd>F436L8BvymJ_0kg4Sqz?lQ3HXx-5FN7-Ak+y1fp-p*{~Y+U^BMs) z3%F5#9+`C9(Di#