MAJOR UPDATE/FEAT: Overhaul of DashboardPage to include VODs;

REFACTOR: General formatting;
UPDATE: Shrink Logo upon opening sidebar on certain pages
This commit is contained in:
Chris-1010
2025-03-02 14:45:37 +00:00
parent 5a49bc8e7b
commit 0a4bbc73e5
15 changed files with 1333 additions and 1431 deletions

View File

@@ -85,7 +85,7 @@ def get_latest_vod(user_id: int):
Returns data of the most recent stream by a streamer
"""
with Database() as db:
latest_vod = db.fetchone("""SELECT * FROM vods WHERE user_id = ? ORDER BY vod_id DESC;""", (user_id,))
latest_vod = db.fetchone("""SELECT vods.*, category_name FROM vods JOIN categories ON vods.category_id = categories.category_id WHERE user_id = ? ORDER BY vod_id DESC;""", (user_id,))
return latest_vod
def get_user_vods(user_id: int):
@@ -93,7 +93,7 @@ def get_user_vods(user_id: int):
Returns data of all vods by a streamer
"""
with Database() as db:
vods = db.fetchall("""SELECT * FROM vods WHERE user_id = ?;""", (user_id,))
vods = db.fetchall("""SELECT vods.*, category_name FROM vods JOIN categories ON vods.category_id = categories.category_id WHERE user_id = ? ORDER BY vod_id DESC;""", (user_id,))
return vods
def get_all_vods():