PATCH: Fixed database not returning data in recommendations
UPDATE: Decreased polling time to 1 second for later use
This commit is contained in:
@@ -4,8 +4,8 @@ def categories():
|
||||
"""
|
||||
Returns all possible streaming categories
|
||||
"""
|
||||
with Database() as db:
|
||||
all_categories = db.fetchall("SELECT * FROM categories")
|
||||
db = Database()
|
||||
all_categories = db.fetchall("SELECT * FROM categories")
|
||||
|
||||
return all_categories
|
||||
|
||||
@@ -13,8 +13,8 @@ def tags():
|
||||
"""
|
||||
Returns all possible streaming tags
|
||||
"""
|
||||
with Database() as db:
|
||||
all_tags = db.fetchall("SELECT * FROM tags")
|
||||
db = Database()
|
||||
all_tags = db.fetchall("SELECT * FROM tags")
|
||||
|
||||
return all_tags
|
||||
|
||||
@@ -22,8 +22,8 @@ def most_popular_category():
|
||||
"""
|
||||
Returns the most popular category based on live stream viewers
|
||||
"""
|
||||
with Database() as db:
|
||||
category = db.fetchone("""
|
||||
db = Database()
|
||||
category = db.fetchone("""
|
||||
SELECT categories.category_id, categories.category_name
|
||||
FROM streams
|
||||
JOIN categories ON streams.category_id = categories.category_id
|
||||
|
||||
Reference in New Issue
Block a user