development #1
Reference in New Issue
Block a user
Delete Branch "development"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Store waveform peaks inline in audio_versions (JSONB columns) so WaveSurfer can render the waveform immediately on page load without waiting for audio decode. Adds a 100-point mini-waveform for version selector thumbnails. Backend: - Migration 0006: adds waveform_peaks and waveform_peaks_mini JSONB columns - Worker generates both resolutions (500-pt full, 100-pt mini) during transcode and stores them directly in DB — replaces file-based waveform_url approach - AudioVersionRead schema exposes both fields inline (no extra HTTP round-trip) - GET /versions/{id}/waveform reads from DB; adds ?resolution=mini support Frontend: - audioService.initialize() accepts peaks and calls ws.load(url, Float32Array) so waveform renders instantly without audio decode - useWaveform hook threads peaks option through to audioService - PlayerPanel passes waveform_peaks from the active version to the hook - New MiniWaveform SVG component (no WaveSurfer) renders mini peaks in the version selector buttons Fix: docker-compose.dev.yml now runs alembic upgrade head before starting the API server, so a fresh volume gets the full schema automatically. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>Two bugs fixed: 1. handle_transcode was writing cdn_hls_base = "hls/{version_id}" to the DB even though HLS files were only in a temp dir (never uploaded to Nextcloud). The stream endpoint then tried to serve this non-existent path, returning 404 and breaking audio playback for every transcoded version. Removed the cdn_hls_base write — stream endpoint falls back to nc_file_path (raw file), which works correctly. 2. Added extract_peaks worker job type: lightweight job that downloads audio and computes waveform_peaks + waveform_peaks_mini only. No transcode, no HLS, no full analysis. 3. Added POST /internal/reindex-peaks endpoint (protected by internal secret): finds all audio_versions with null waveform_peaks and enqueues extract_peaks jobs. Safe to call multiple times. Use after a fresh DB scan or peak algorithm changes. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>