diff --git a/README.md b/README.md index 271c2fe..3d8c242 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # Theme Song Booth -**Version:** `v0.5.2` +**Version:** `v0.5.3` A Flask web application for running a convention booth where visitors request a custom AI-generated theme song. Operators manage the queue from an admin dashboard, generate Suno prompts, upload MP3 previews, collect payment, and deliver final songs by email. diff --git a/VERSION b/VERSION index cb0c939..be14282 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -0.5.2 +0.5.3 diff --git a/app.py b/app.py index 4f15ff8..b83e57e 100644 --- a/app.py +++ b/app.py @@ -350,7 +350,10 @@ def get_kiosk_cycle_seconds(): def get_kiosk_mode(): - """Return 'cycle', 'qr', or 'prices' based on kiosk_cycle_seconds setting.""" + """ + Return 'qr', 'prices', 'queue', or 'cycle' based on kiosk_cycle_seconds setting. + -1 = QR only, 0 = prices only, 1 = queue only, 5+ = cycle through all three. + """ cfg = load_booth_settings() try: val = int(cfg.get('kiosk_cycle_seconds', 10)) @@ -360,6 +363,8 @@ def get_kiosk_mode(): return 'qr' if val == 0: return 'prices' + if val == 1: + return 'queue' return 'cycle' @@ -1017,12 +1022,35 @@ def kiosk(): mode = get_kiosk_mode() booth_open = get_booth_open() + # Build the public queue: only active statuses, mapped to friendly names, + # using the local-part of the email as the customer name. + KIOSK_STATUS_MAP = { + 'pending': 'Received', + 'prompt_ready': 'Trollgorithm Recording in Studio', + 'songs_uploaded': 'Trollgorithm Recording in Studio', + 'revisions_requested': 'Waiting for Customer Response', + 'awaiting_payment': 'Payment Due', + } + active_statuses = set(KIOSK_STATUS_MAP.keys()) + raw_queue = list_requests() + queue = [] + for r in raw_queue: + if r.get('status') in active_statuses: + email = r.get('email') or '' + name = email.split('@')[0] if '@' in email else email + queue.append({ + 'name': name or 'Guest', + 'status': KIOSK_STATUS_MAP[r['status']], + 'raw_status': r['status'], + }) + return render_template( 'kiosk.html', booth_open=booth_open, price_items=price_items, cycle_seconds=cycle_seconds, mode=mode, + queue=queue, refresh_seconds=30 ) diff --git a/templates/admin/settings.html b/templates/admin/settings.html index d70e3b2..2051b4c 100644 --- a/templates/admin/settings.html +++ b/templates/admin/settings.html @@ -272,12 +272,12 @@
Set how the public /kiosk page cycles. Use -1 for QR only, 0 for pricing only, or 5+ seconds to cycle between them.
+Set how the public /kiosk page cycles. Use -1 for QR only, 0 for pricing only, 1 for queue only, or 5+ seconds to cycle between QR, pricing, and queue.