Netflix/Tubi-style catalog browser and pay-to-play queue management for CyTube
Project description
kryten-webqueue
Netflix/Tubi-style catalog browser and pay-to-play queue management for CyTube.
Architecture
Browser → nginx (queue.dropsugar.co) → kryten-webqueue (:2010) → kryten-api-gate (:24444) → NATS services
- HTTP-only — webqueue never touches NATS directly
- SQLite for all local state (catalog, OTPs, queue shadow, playlists, schedules)
- WebSocket for real-time queue updates
- Polling api-gate every 3 seconds for playlist state
Quick Start
# Install
python -m venv .venv
.venv/bin/pip install -e .
# Configure
cp config.example.json /etc/kryten-webqueue/config.json
# Edit config.json with your secrets
# Run
WQ_CONFIG=/etc/kryten-webqueue/config.json python -m kryten_webqueue
Configuration
See config.example.json for all options. Required secrets:
| Key | Description |
|---|---|
secret_key |
Random string for JWT signing (≥32 chars) |
api_gate_token |
Bearer token for kryten-api-gate |
mediacms_token |
API token for MediaCMS catalog sync |
Deployment
# Install service
sudo cp deploy/kryten-webqueue.service /etc/systemd/system/
sudo systemctl daemon-reload
sudo systemctl enable --now kryten-webqueue
# nginx
sudo cp deploy/nginx-queue.conf /etc/nginx/sites-available/queue.dropsugar.co
sudo ln -s /etc/nginx/sites-available/queue.dropsugar.co /etc/nginx/sites-enabled/
sudo nginx -t && sudo systemctl reload nginx
API Endpoints
Auth
POST /auth/otp/request— Request OTP (delivered via PM)POST /auth/otp/verify— Verify OTP, get session cookiePOST /auth/logout— Clear sessionGET /auth/me— Current user info
Catalog
GET /catalog/browse— Paginated browse (with category filter)GET /catalog/search?q=...— Full-text searchGET /catalog/item/{token}— Item detailGET /catalog/categories— List categories
Queue
GET /queue/state— Current queue statePOST /queue/add— Add item (FIFO pay-queue)POST /queue/playnext— Add as play-next (premium)GET /queue/preview?friendly_token=...&tier=...— Cost previewGET /queue/history— User's queue history
User
GET /user/balance— Economy balanceGET /user/transactions— Transaction historyGET /user/profile— Profile info
Admin (rank ≥ 3)
GET/POST/PUT/DELETE /admin/playlists/...— Saved playlists CRUDGET/POST/PUT/DELETE /admin/schedules/...— Schedule CRUDPOST /admin/schedules/{id}/fire— Manual firePOST /admin/queue/clear— Clear queue (refunds pay items)DELETE /admin/queue/{uid}— Remove itemPOST /admin/queue/sync-now— Trigger catalog sync
WebSocket
ws://host/ws— Real-time queue updates (auth via session cookie)
Dependencies
- Python ≥ 3.12
- kryten-api-gate ≥ 0.3.6
- kryten-py ≥ 0.16.1 (upstream, not a direct dependency)
- kryten-economy ≥ 0.8.11 (upstream, not a direct dependency)
License
Proprietary — DropSugar / Q&A
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
kryten_webqueue-0.2.6.tar.gz
(82.0 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file kryten_webqueue-0.2.6.tar.gz.
File metadata
- Download URL: kryten_webqueue-0.2.6.tar.gz
- Upload date:
- Size: 82.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7046035f35f35bda670207b1ec34f5c925190acd4ee99289348b99ec755522ef
|
|
| MD5 |
46e7f6dcdce3bef688a1983eaf4d0b99
|
|
| BLAKE2b-256 |
fa9bce969771f5b7219e8e0574065742546ed7c3f54d602e493ed8096cec7511
|
File details
Details for the file kryten_webqueue-0.2.6-py3-none-any.whl.
File metadata
- Download URL: kryten_webqueue-0.2.6-py3-none-any.whl
- Upload date:
- Size: 46.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a2b2fa6b6a9ab6cf5d80a5ecd790859f7ccfe5982a7c8e3b8d60579daa503f33
|
|
| MD5 |
6f6d15c7aab0ddf4f77187d6d0875708
|
|
| BLAKE2b-256 |
65cc968b97109f9640652fa571b7fadd7f6fa236f8005e02eea423f9230ac688
|