FIX: Vods Showing Issue
This commit is contained in:
@@ -1,12 +1,11 @@
|
|||||||
import React from "react";
|
import React from "react";
|
||||||
import ListRow from "../components/Layout/ListRow";
|
import ListRow from "../components/Layout/ListRow";
|
||||||
import { useNavigate } from "react-router-dom";
|
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 Button from "../components/Input/Button";
|
||||||
import DynamicPageContent from "../components/Layout/DynamicPageContent";
|
import DynamicPageContent from "../components/Layout/DynamicPageContent";
|
||||||
import LoadingScreen from "../components/Layout/LoadingScreen";
|
import LoadingScreen from "../components/Layout/LoadingScreen";
|
||||||
import Footer from "../components/Layout/Footer";
|
import Footer from "../components/Layout/Footer";
|
||||||
import { useVods } from "../hooks/useContent"; // Import useVods
|
|
||||||
|
|
||||||
|
|
||||||
interface HomePageProps {
|
interface HomePageProps {
|
||||||
|
|||||||
@@ -162,6 +162,7 @@ def vods(username):
|
|||||||
vods = get_user_vods(user_id)
|
vods = get_user_vods(user_id)
|
||||||
return jsonify(vods)
|
return jsonify(vods)
|
||||||
|
|
||||||
|
@stream_bp.route('/vods/all')
|
||||||
def get_all_vods():
|
def get_all_vods():
|
||||||
"""
|
"""
|
||||||
Returns data of all VODs by all streamers in a JSON-compatible format
|
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:
|
with Database() as db:
|
||||||
vods = db.fetchall("SELECT * FROM vods")
|
vods = db.fetchall("SELECT * FROM vods")
|
||||||
|
|
||||||
print("Fetched VODs from DB:", vods) # ✅ Debugging line
|
print("Fetched VODs from DB:", vods)
|
||||||
|
|
||||||
return jsonify(vods)
|
return jsonify(vods)
|
||||||
|
|
||||||
|
|
||||||
# RTMP Server Routes
|
# RTMP Server Routes
|
||||||
|
|
||||||
@stream_bp.route("/init_stream", methods=["POST"])
|
@stream_bp.route("/init_stream", methods=["POST"])
|
||||||
@@ -198,7 +198,7 @@ def init_stream():
|
|||||||
|
|
||||||
# Create necessary directories
|
# Create necessary directories
|
||||||
username = user_info["username"]
|
username = user_info["username"]
|
||||||
create_user_directories(username)
|
create_local_directories(username)
|
||||||
|
|
||||||
return redirect(f"/stream/{username}")
|
return redirect(f"/stream/{username}")
|
||||||
|
|
||||||
@@ -216,6 +216,7 @@ def publish_stream():
|
|||||||
periodically update thumbnail
|
periodically update thumbnail
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
|
||||||
try:
|
try:
|
||||||
data = json.loads(request.form.get("data"))
|
data = json.loads(request.form.get("data"))
|
||||||
except json.JSONDecodeError as ex:
|
except json.JSONDecodeError as ex:
|
||||||
|
|||||||
Binary file not shown.
Reference in New Issue
Block a user