kryten-webqueue 0.2.0__tar.gz → 0.2.2__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {kryten_webqueue-0.2.0 → kryten_webqueue-0.2.2}/PKG-INFO +1 -1
- {kryten_webqueue-0.2.0 → kryten_webqueue-0.2.2}/config.example.json +1 -1
- {kryten_webqueue-0.2.0 → kryten_webqueue-0.2.2}/deploy/nginx-queue.conf +12 -2
- {kryten_webqueue-0.2.0 → kryten_webqueue-0.2.2}/kryten_webqueue/__main__.py +1 -1
- {kryten_webqueue-0.2.0 → kryten_webqueue-0.2.2}/kryten_webqueue/routes/pages.py +5 -6
- {kryten_webqueue-0.2.0 → kryten_webqueue-0.2.2}/pyproject.toml +1 -1
- {kryten_webqueue-0.2.0 → kryten_webqueue-0.2.2}/.github/workflows/python-publish.yml +0 -0
- {kryten_webqueue-0.2.0 → kryten_webqueue-0.2.2}/.github/workflows/release.yml +0 -0
- {kryten_webqueue-0.2.0 → kryten_webqueue-0.2.2}/.gitignore +0 -0
- {kryten_webqueue-0.2.0 → kryten_webqueue-0.2.2}/README.md +0 -0
- {kryten_webqueue-0.2.0 → kryten_webqueue-0.2.2}/deploy/kryten-webqueue.service +0 -0
- {kryten_webqueue-0.2.0 → kryten_webqueue-0.2.2}/docs/IMPLEMENTATION_SPEC.md +0 -0
- {kryten_webqueue-0.2.0 → kryten_webqueue-0.2.2}/docs/IMPL_API_GATE.md +0 -0
- {kryten_webqueue-0.2.0 → kryten_webqueue-0.2.2}/docs/IMPL_ECONOMY.md +0 -0
- {kryten_webqueue-0.2.0 → kryten_webqueue-0.2.2}/docs/IMPL_KRYTEN_PY.md +0 -0
- {kryten_webqueue-0.2.0 → kryten_webqueue-0.2.2}/docs/IMPL_ROBOT.md +0 -0
- {kryten_webqueue-0.2.0 → kryten_webqueue-0.2.2}/docs/PRE_PLAN_GAPS.md +0 -0
- {kryten_webqueue-0.2.0 → kryten_webqueue-0.2.2}/docs/PRODUCT_PLAN.md +0 -0
- {kryten_webqueue-0.2.0 → kryten_webqueue-0.2.2}/kryten_webqueue/__init__.py +0 -0
- {kryten_webqueue-0.2.0 → kryten_webqueue-0.2.2}/kryten_webqueue/api_gate/__init__.py +0 -0
- {kryten_webqueue-0.2.0 → kryten_webqueue-0.2.2}/kryten_webqueue/api_gate/client.py +0 -0
- {kryten_webqueue-0.2.0 → kryten_webqueue-0.2.2}/kryten_webqueue/app.py +1 -1
- {kryten_webqueue-0.2.0 → kryten_webqueue-0.2.2}/kryten_webqueue/auth/__init__.py +0 -0
- {kryten_webqueue-0.2.0 → kryten_webqueue-0.2.2}/kryten_webqueue/auth/otp.py +0 -0
- {kryten_webqueue-0.2.0 → kryten_webqueue-0.2.2}/kryten_webqueue/auth/rate_limit.py +0 -0
- {kryten_webqueue-0.2.0 → kryten_webqueue-0.2.2}/kryten_webqueue/auth/session.py +0 -0
- {kryten_webqueue-0.2.0 → kryten_webqueue-0.2.2}/kryten_webqueue/catalog/__init__.py +0 -0
- {kryten_webqueue-0.2.0 → kryten_webqueue-0.2.2}/kryten_webqueue/catalog/db.py +0 -0
- {kryten_webqueue-0.2.0 → kryten_webqueue-0.2.2}/kryten_webqueue/catalog/images.py +0 -0
- {kryten_webqueue-0.2.0 → kryten_webqueue-0.2.2}/kryten_webqueue/catalog/sync.py +0 -0
- {kryten_webqueue-0.2.0 → kryten_webqueue-0.2.2}/kryten_webqueue/config.py +0 -0
- {kryten_webqueue-0.2.0 → kryten_webqueue-0.2.2}/kryten_webqueue/playlists/__init__.py +0 -0
- {kryten_webqueue-0.2.0 → kryten_webqueue-0.2.2}/kryten_webqueue/playlists/fire.py +0 -0
- {kryten_webqueue-0.2.0 → kryten_webqueue-0.2.2}/kryten_webqueue/playlists/importer.py +0 -0
- {kryten_webqueue-0.2.0 → kryten_webqueue-0.2.2}/kryten_webqueue/playlists/scheduler.py +0 -0
- {kryten_webqueue-0.2.0 → kryten_webqueue-0.2.2}/kryten_webqueue/queue/__init__.py +0 -0
- {kryten_webqueue-0.2.0 → kryten_webqueue-0.2.2}/kryten_webqueue/queue/ordering.py +0 -0
- {kryten_webqueue-0.2.0 → kryten_webqueue-0.2.2}/kryten_webqueue/queue/poller.py +0 -0
- {kryten_webqueue-0.2.0 → kryten_webqueue-0.2.2}/kryten_webqueue/queue/shadow.py +0 -0
- {kryten_webqueue-0.2.0 → kryten_webqueue-0.2.2}/kryten_webqueue/routes/__init__.py +0 -0
- {kryten_webqueue-0.2.0 → kryten_webqueue-0.2.2}/kryten_webqueue/routes/admin_playlists.py +0 -0
- {kryten_webqueue-0.2.0 → kryten_webqueue-0.2.2}/kryten_webqueue/routes/admin_queue.py +0 -0
- {kryten_webqueue-0.2.0 → kryten_webqueue-0.2.2}/kryten_webqueue/routes/admin_schedules.py +0 -0
- {kryten_webqueue-0.2.0 → kryten_webqueue-0.2.2}/kryten_webqueue/routes/auth.py +0 -0
- {kryten_webqueue-0.2.0 → kryten_webqueue-0.2.2}/kryten_webqueue/routes/catalog.py +0 -0
- {kryten_webqueue-0.2.0 → kryten_webqueue-0.2.2}/kryten_webqueue/routes/queue.py +0 -0
- {kryten_webqueue-0.2.0 → kryten_webqueue-0.2.2}/kryten_webqueue/routes/user.py +0 -0
- {kryten_webqueue-0.2.0 → kryten_webqueue-0.2.2}/kryten_webqueue/static/css/main.css +0 -0
- {kryten_webqueue-0.2.0 → kryten_webqueue-0.2.2}/kryten_webqueue/static/js/main.js +0 -0
- {kryten_webqueue-0.2.0 → kryten_webqueue-0.2.2}/kryten_webqueue/templates/admin/index.html +0 -0
- {kryten_webqueue-0.2.0 → kryten_webqueue-0.2.2}/kryten_webqueue/templates/auth/login.html +0 -0
- {kryten_webqueue-0.2.0 → kryten_webqueue-0.2.2}/kryten_webqueue/templates/base.html +0 -0
- {kryten_webqueue-0.2.0 → kryten_webqueue-0.2.2}/kryten_webqueue/templates/catalog/browse.html +0 -0
- {kryten_webqueue-0.2.0 → kryten_webqueue-0.2.2}/kryten_webqueue/templates/queue/index.html +0 -0
- {kryten_webqueue-0.2.0 → kryten_webqueue-0.2.2}/kryten_webqueue/templates/user/dashboard.html +0 -0
- {kryten_webqueue-0.2.0 → kryten_webqueue-0.2.2}/kryten_webqueue/ws/__init__.py +0 -0
- {kryten_webqueue-0.2.0 → kryten_webqueue-0.2.2}/kryten_webqueue/ws/handler.py +0 -0
- {kryten_webqueue-0.2.0 → kryten_webqueue-0.2.2}/kryten_webqueue/ws/manager.py +0 -0
|
@@ -1,9 +1,17 @@
|
|
|
1
1
|
server {
|
|
2
|
-
listen 443 ssl
|
|
2
|
+
listen 443 ssl;
|
|
3
|
+
http2 on;
|
|
3
4
|
server_name queue.dropsugar.co;
|
|
4
5
|
|
|
5
6
|
ssl_certificate /etc/letsencrypt/live/queue.dropsugar.co/fullchain.pem;
|
|
6
7
|
ssl_certificate_key /etc/letsencrypt/live/queue.dropsugar.co/privkey.pem;
|
|
8
|
+
ssl_protocols TLSv1.2 TLSv1.3;
|
|
9
|
+
ssl_ciphers ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305;
|
|
10
|
+
ssl_prefer_server_ciphers off;
|
|
11
|
+
ssl_session_cache shared:SSL:10m;
|
|
12
|
+
ssl_session_timeout 1d;
|
|
13
|
+
|
|
14
|
+
add_header Strict-Transport-Security "max-age=31536000" always;
|
|
7
15
|
|
|
8
16
|
# WebSocket upgrade
|
|
9
17
|
location /ws {
|
|
@@ -21,6 +29,8 @@ server {
|
|
|
21
29
|
# API + pages
|
|
22
30
|
location / {
|
|
23
31
|
proxy_pass http://127.0.0.1:2010;
|
|
32
|
+
proxy_http_version 1.1;
|
|
33
|
+
proxy_set_header Connection "";
|
|
24
34
|
proxy_set_header Host $host;
|
|
25
35
|
proxy_set_header X-Real-IP $remote_addr;
|
|
26
36
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
|
@@ -45,5 +55,5 @@ server {
|
|
|
45
55
|
server {
|
|
46
56
|
listen 80;
|
|
47
57
|
server_name queue.dropsugar.co;
|
|
48
|
-
return 301 https://$
|
|
58
|
+
return 301 https://$host$request_uri;
|
|
49
59
|
}
|
|
@@ -9,7 +9,7 @@ def main():
|
|
|
9
9
|
config_path = os.environ.get("WQ_CONFIG", "/etc/kryten-webqueue/config.json")
|
|
10
10
|
config = Config.from_file(config_path)
|
|
11
11
|
app = create_app(config)
|
|
12
|
-
uvicorn.run(app, host=config.host, port=config.port)
|
|
12
|
+
uvicorn.run(app, host=config.host, port=config.port, log_level="info")
|
|
13
13
|
|
|
14
14
|
|
|
15
15
|
if __name__ == "__main__":
|
|
@@ -36,7 +36,7 @@ async def login_page(request: Request):
|
|
|
36
36
|
user = _get_user_or_none(request)
|
|
37
37
|
if user:
|
|
38
38
|
return RedirectResponse("/catalog/browse")
|
|
39
|
-
return templates.TemplateResponse("auth/login.html", {"
|
|
39
|
+
return templates.TemplateResponse(request, "auth/login.html", {"user": None})
|
|
40
40
|
|
|
41
41
|
|
|
42
42
|
@router.get("/catalog/browse", response_class=HTMLResponse)
|
|
@@ -47,8 +47,7 @@ async def catalog_browse_page(request: Request, category: str | None = None, pag
|
|
|
47
47
|
db = request.app.state.db
|
|
48
48
|
items = await db.browse(category=category, page=page)
|
|
49
49
|
categories = await db.get_categories()
|
|
50
|
-
return templates.TemplateResponse("catalog/browse.html", {
|
|
51
|
-
"request": request,
|
|
50
|
+
return templates.TemplateResponse(request, "catalog/browse.html", {
|
|
52
51
|
"user": user,
|
|
53
52
|
"items": items,
|
|
54
53
|
"categories": categories,
|
|
@@ -63,7 +62,7 @@ async def queue_page(request: Request):
|
|
|
63
62
|
user = _get_user_or_none(request)
|
|
64
63
|
if not user:
|
|
65
64
|
return RedirectResponse("/auth/login")
|
|
66
|
-
return templates.TemplateResponse("queue/index.html", {"
|
|
65
|
+
return templates.TemplateResponse(request, "queue/index.html", {"user": user})
|
|
67
66
|
|
|
68
67
|
|
|
69
68
|
@router.get("/user/dashboard", response_class=HTMLResponse)
|
|
@@ -71,7 +70,7 @@ async def user_dashboard_page(request: Request):
|
|
|
71
70
|
user = _get_user_or_none(request)
|
|
72
71
|
if not user:
|
|
73
72
|
return RedirectResponse("/auth/login")
|
|
74
|
-
return templates.TemplateResponse("user/dashboard.html", {"
|
|
73
|
+
return templates.TemplateResponse(request, "user/dashboard.html", {"user": user})
|
|
75
74
|
|
|
76
75
|
|
|
77
76
|
@router.get("/admin", response_class=HTMLResponse)
|
|
@@ -79,4 +78,4 @@ async def admin_page(request: Request):
|
|
|
79
78
|
user = _get_user_or_none(request)
|
|
80
79
|
if not user or user.get("rank", 0) < 3:
|
|
81
80
|
return RedirectResponse("/auth/login")
|
|
82
|
-
return templates.TemplateResponse("admin/index.html", {"
|
|
81
|
+
return templates.TemplateResponse(request, "admin/index.html", {"user": user})
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -93,11 +93,11 @@ async def lifespan(app: FastAPI):
|
|
|
93
93
|
async def _catalog_sync_loop():
|
|
94
94
|
interval = config.catalog_sync_interval_hours * 3600
|
|
95
95
|
while True:
|
|
96
|
-
await asyncio.sleep(interval)
|
|
97
96
|
try:
|
|
98
97
|
await catalog_sync.sync()
|
|
99
98
|
except Exception as e:
|
|
100
99
|
logger.error(f"Catalog sync error: {e}")
|
|
100
|
+
await asyncio.sleep(interval)
|
|
101
101
|
|
|
102
102
|
async def _otp_cleanup_loop():
|
|
103
103
|
while True:
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{kryten_webqueue-0.2.0 → kryten_webqueue-0.2.2}/kryten_webqueue/templates/catalog/browse.html
RENAMED
|
File without changes
|
|
File without changes
|
{kryten_webqueue-0.2.0 → kryten_webqueue-0.2.2}/kryten_webqueue/templates/user/dashboard.html
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|