UPDATE: Get All Vods
This commit is contained in:
@@ -162,6 +162,17 @@ def vods(username):
|
||||
vods = get_user_vods(user_id)
|
||||
return jsonify(vods)
|
||||
|
||||
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) # ✅ Debugging line
|
||||
|
||||
return jsonify(vods)
|
||||
|
||||
|
||||
# RTMP Server Routes
|
||||
|
||||
|
||||
Binary file not shown.
@@ -84,6 +84,14 @@ def get_user_vods(user_id: int):
|
||||
vods = db.fetchall("""SELECT * FROM vods WHERE user_id = ?;""", (user_id,))
|
||||
return vods
|
||||
|
||||
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""")
|
||||
return vods
|
||||
|
||||
def generate_thumbnail(stream_file: str, thumbnail_file: str, retry_time=5, retry_count=3) -> None:
|
||||
"""
|
||||
Generates the thumbnail of a stream
|
||||
|
||||
Reference in New Issue
Block a user