Commit Graph

77 Commits

Author SHA1 Message Date
ComputerTech af109381c1 Reduce buffering: 250ms DJ chunks, 1024-chunk preroll, X-Accel-Buffering header 2026-03-10 19:32:24 +00:00
ComputerTech 43a3e692fc Fix upload error handling; log 413 nginx size limit clearly 2026-03-10 19:13:39 +00:00
ComputerTech 1fa6887efd Fix stream URL detection for custom domains; add listener_url config 2026-03-10 19:07:04 +00:00
ComputerTech dfccec2b48 Stability fixes: loop end-of-track guard, DJ disconnect grace period, StreamingWorker race condition fix, various audit cleanups 2026-03-10 18:53:17 +00:00
ComputerTech 8c3c2613b1 Fix broadcast broken: reconnect loop, listener stuck on waiting
- server.py: Increase ping_timeout 10->60, ping_interval 5->25 to prevent
  frequent socket disconnects during audio streaming
- server.py: Guard dj_start() against reconnect loops - only clear pre-roll
  and emit broadcast_started on a fresh broadcast, not on DJ reconnects
- listener.js: Add polling fallback to transports (websocket-only caused
  silent failure on upgrade error), set reconnectionAttempts to Infinity
- script.js: Same transport fallback fix for DJ panel socket
- techdj_qt.py: Add _broadcast_started flag to StreamingWorker.on_connect
  so streaming_started signal only fires once; reconnects resume silently.
  Reset flag in stop_streaming() for clean next session.
2026-03-09 20:47:52 +00:00
ComputerTech 5ba5c45e64 Fix: audio isolation via PULSE_SINK env var before QApplication
- Replace fragile PID-based PulseAudioIsolator class with module-level
  PULSE_SINK approach: create virtual null sink BEFORE QApplication()
  so Qt routes all audio there automatically
- Add verification that the monitor source actually exists before trusting it
- Add clear startup diagnostics (✓ confirmations for each step)
- get_audio_capture_source() now double-checks monitor still exists
- Fails loudly instead of silently falling back to default.monitor
- Remove threading import (no longer needed)
- Add atexit cleanup for virtual sink teardown
2026-03-09 20:26:36 +00:00
ComputerTech cddce99b29 Fix: isolate DJ audio from system audio in streaming/recording
The Qt app was using PulseAudio's 'default.monitor' which captures ALL
system audio (YouTube Music, Spotify, browser, etc.). This caused listeners
to hear whatever was playing on the DJ's system, not just the DJ mix.

Added PulseAudioIsolator class that:
- Creates a virtual PulseAudio null sink ('techdj_stream')
- Routes only this app's audio to the virtual sink
- Creates a loopback so the DJ still hears their mix through speakers
- Captures from the virtual sink's monitor (only DJ audio)
- Reference-counted: shared between streaming and recording workers
- Automatically cleans up stale sinks from previous crashes
- Periodically re-routes audio to catch new tracks/streams
- Falls back to default.monitor if pactl is unavailable

Both StreamingWorker and RecordingWorker now use the isolator.
2026-03-09 19:45:43 +00:00
ComputerTech abf907ddfb Fix 6 bugs: remove dead listener code from DJ panel, fix StreamingWorker socket reuse, fix GUI-blocking time.sleep, fix abort import
- script.js: Remove ~500 lines of dead listener mode code (initListenerMode, enableListenerAudio, setListenerVolume, startListenerVUMeter, getMp3FallbackUrl, listener variables). Listener page now uses listener.js exclusively.
- script.js: Remove ?listen=true detection from DOMContentLoaded that could activate broken listener UI on DJ panel.
- script.js: Clean up initSocket() to remove dead listener mode detection logic.
- index.html: Remove dead #listener-mode div (now served by listener.html).
- server.py: Move 'abort' import to top-level Flask import instead of per-request import.
- techdj_qt.py: Fix StreamingWorker to create fresh socketio.Client on each streaming session, preventing stale socket state on reconnect.
- techdj_qt.py: Fix time.sleep(0.2) blocking GUI thread in stop_streaming() by removing it and using try/except for clean disconnect.
2026-03-09 19:16:42 +00:00
ComputerTech 7c33c678aa Fix listener serving DJ panel instead of listener page
- Block DJ-only files (index.html, script.js, style.css) on listener server
- Disable Flask built-in static handler on listener (static_folder=None)
  to prevent it from serving index.html before custom routes
- Add Cache-Control no-store headers to index route to prevent
  nginx/browser from caching stale index.html for listener URL
2026-03-09 19:01:42 +00:00
ComputerTech 5a7f4e81a4 Separate listener page from DJ panel
- Created standalone listener.html, listener.js, listener.css
- Listener server now serves listener.html instead of index.html
- Eliminates flash of DJ panel when loading listener page
- setup_shared_routes() accepts index_file parameter
2026-03-09 18:50:04 +00:00
ComputerTech df283498eb Add config.json system; fix bugs across server.py, script.js, techdj_qt.py
- Add config.example.json with all options: host, dj_port, listener_port,
  dj_panel_password, secret_key, music_folder, stream_bitrate, max_upload_mb,
  cors_origins, debug (copy to config.json to use)
- server.py: drive host/ports/secrets/CORS/upload limit from config.json;
  fix serve_static to use allowlist only; move re import to top-level;
  fix inconsistent indentation in login/logout/before_request handlers
- script.js: fix undefined decks.crossfader in updateUIFromMixerStatus;
  declare mediaRecorder as a proper let variable
- techdj_qt.py: replace blocking time.sleep poll in YTDownloadWorker with
  non-blocking QTimer; fix fragile or-chained lambda in recording reset
2026-03-09 18:02:47 +00:00
ComputerTech 1f07b87c36 Fix actual root causes: waveform black block, body gradient bleed, JS glow override 2026-03-05 18:02:08 +00:00
ComputerTech 663ea17040 Fix visual bugs: hide VU canvases (black block), inset deck box-shadows (colored line bleed) 2026-03-05 17:42:37 +00:00
ComputerTech 49062cf6de Fix VU canvas black blocks and colored glow-bleed lines 2026-03-05 17:25:40 +00:00
ComputerTech b5ea9e8d01 Final bug sweep: fix event param, remove dead code, dedupe CSS; add .gitignore recordings/ 2026-03-05 14:28:17 +00:00
ComputerTech 12c01faa83 feat: add integrated deck queues and track loop functionality 2026-02-07 20:14:04 +00:00
ComputerTech 6246b26925 Mobile UX improvements: Remove emojis, convert to British English, fix queue navigation and floating buttons
- Removed all emojis from UI (replaced with text labels)
- Converted all American English to British English (initialise, optimise, visualiser)
- Fixed mobile queue section visibility in portrait/landscape modes
- Added proper CSS rules for show-queue-A and show-queue-B classes
- Repositioned floating action buttons to prevent overlap with mobile tabs
- Added responsive button sizing for mobile (50px) and small screens (45px)
- Stacked buttons vertically on screens ≤480px
- Disabled all body::before border effects that were blocking UI
- Fixed crossfader width: 70% in portrait, 100% in landscape
- Removed unnecessary .md files (COMPARISON.md, PYQT5_FEATURES.md, QUICKSTART.md, README_PYQT5.md)
- Updated README.md with British English and removed emojis
2026-02-02 02:37:56 +00:00
ComputerTech c2085291c0 hm 2026-01-20 20:04:39 +00:00
ComputerTech 02f72e2372 Fix buffering issue and app bugs: improve stream delivery, fixed reset UI desync, and EQ naming 2026-01-20 18:14:50 +00:00
ComputerTech 1776f631ef Fix filter sliders - connect low-pass and high-pass to audio engine 2026-01-20 18:05:50 +00:00
ComputerTech 740fa34f93 Make deck header more compact with smaller fonts and tighter spacing 2026-01-20 18:01:45 +00:00
ComputerTech de973b2a0e Add loop/repeat and queue features for both decks 2026-01-20 17:57:19 +00:00
ComputerTech ee26294106 Fix critical bugs: broadcast thread, resource cleanup, and Socket.IO error handling 2026-01-20 17:49:00 +00:00
ComputerTech d7a11c2af2 Add window icon to PyQt5 application 2026-01-20 17:30:56 +00:00
ComputerTech 7be14e3e8c Fix venv path to check for .venv directory 2026-01-20 17:24:41 +00:00
ComputerTech 00eff40199 Add virtual environment activation support to launch script 2026-01-20 17:21:40 +00:00
ComputerTech 25f91570c5 Fix desktop launcher hanging by skipping dependency install in non-interactive mode 2026-01-20 17:20:33 +00:00
ComputerTech 19f6726a33 Optimize desktop launcher for silent startup and restore server URL detection 2026-01-20 17:17:57 +00:00
ComputerTech c9fc389d94 Fix reset button crash by removing non-existent slider references 2026-01-20 17:10:13 +00:00
ComputerTech 410ecae3dd Implement reset button functionality for deck controls 2026-01-20 17:08:35 +00:00
ComputerTech 06beed2110 Add detailed error logging and timeout to remote track downloads 2026-01-20 17:05:24 +00:00
ComputerTech bd87eb719d Fix Socket.IO connection with enhanced error handling and remote server detection in launch script 2026-01-20 17:01:37 +00:00
ComputerTech 6fc538336a Add remote server support with configurable ports and auto-refresh settings UI 2026-01-20 16:57:01 +00:00
ComputerTech 1606a3a83c Implement native PyQt5 DJ app with ultra-low latency broadcasting and stability fixes 2026-01-19 14:27:06 +00:00
ComputerTech 69cdbd5b3b Implement comprehensive Mobile UX overhaul: portrait layout, haptics, swipes, and touch optimization 2026-01-18 20:00:13 +00:00
ComputerTech 405efb6472 Add custom keyboard mapping and remove remote stream relay 2026-01-18 14:57:10 +00:00
ComputerTech 508b93125d Optimize Stream: YouTube removal, Latency improvements, Hotel Wi-Fi kit, and Listener sync 2026-01-18 14:16:06 +00:00
ComputerTech 8ab422a7aa added yt-dlp option 2026-01-03 19:16:26 +00:00
3nd3r e4f27c012d Update README with remote stream relay feature documentation
- Added remote stream relay to features list
- Added usage instructions for remote relay
- Added troubleshooting section for relay issues
2026-01-03 10:30:40 -06:00
3nd3r 81120ac7ea Add remote stream relay feature: relay remote DJ streams to listeners
- Server-side: Added remote URL support in ffmpeg transcoder
- UI: Added relay controls in streaming panel with URL input
- Client: Added start/stop relay functions with socket communication
- Listener: Shows remote relay status in stream indicator
2026-01-03 10:29:10 -06:00
3nd3r 5e06254e1a Update README with latest features: listener spectrum, Cloudflare compatibility, and deployment notes 2026-01-03 10:16:53 -06:00
3nd3r 7087d553b0 Use same-origin MP3 stream URL for proxies 2026-01-03 09:54:58 -06:00
3nd3r 9a53a33341 Stop tracking pycache files 2026-01-03 09:17:28 -06:00
3nd3r 95b01fd436 Add optional DJ panel password 2026-01-03 09:12:57 -06:00
3nd3r 2db40e4547 Switch listener streaming to MP3-only 2026-01-03 08:14:03 -06:00
ComputerTech 111f4b347e beep 2026-01-03 14:02:07 +00:00
3nd3r c08ee70fe8 Add listener spectrum visualizer 2026-01-02 23:41:36 -06:00
3nd3r 7141bd900e Add README and improve gitignore 2026-01-02 22:39:54 -06:00
3nd3r 269da2c569 Fix ffmpeg transcoder timestamp crash 2026-01-02 22:29:32 -06:00
3nd3r 249b1cb210 Add /stream_debug and improve MP3 transcoder startup 2026-01-02 22:27:04 -06:00