MULTI-UPDATE: Big Error Cleanup:
Enhanced Docker and Nginx configurations - Can now run frontend either on local dev version OR the docker version; Improved socket connection handling; Refactored stream data fetching in VideoPage to properly display stream data; Chat-Visibility Button moved to ChatPanel so that chat's socket persists when hiding/showing chat;
This commit is contained in:
@@ -1,3 +1,10 @@
|
||||
from flask_socketio import SocketIO
|
||||
|
||||
socketio = SocketIO(cors_allowed_origins="*", async_mode='gevent', logger=True, engineio_logger=True)
|
||||
socketio = SocketIO(
|
||||
cors_allowed_origins="*",
|
||||
async_mode='gevent',
|
||||
logger=False, # Reduce logging
|
||||
engineio_logger=False, # Reduce logging
|
||||
ping_timeout=5000,
|
||||
ping_interval=25000
|
||||
)
|
||||
@@ -74,9 +74,12 @@ def user_stream(user_id: int, stream_id: int) -> dict:
|
||||
"""
|
||||
with Database() as db:
|
||||
stream = db.fetchone("""
|
||||
SELECT * FROM streams
|
||||
WHERE user_id = ?
|
||||
AND stream_id = ?
|
||||
SELECT u.username, s.user_id, s.title, s.start_time, s.num_viewers, c.category_name
|
||||
FROM streams AS s
|
||||
JOIN categories AS c ON s.category_id = c.category_id
|
||||
JOIN users AS u ON s.user_id = u.user_id
|
||||
WHERE u.user_id = ?
|
||||
AND s.stream_id = ?
|
||||
""", (user_id, stream_id))
|
||||
return stream
|
||||
|
||||
|
||||
Reference in New Issue
Block a user