Commit Graph
5186 Commits
Author SHA1 Message Date
vicrodh a044017c3b fix: more $t() and store access issues in $derived() blocks
- PlaylistModal: convert $derived with get(t) to regular function
- LocalLibraryTagEditorModal: rename 't' to 'track' in map to avoid
  shadowing the t store

cc
2026-02-04 14:18:36 -06:00
vicrodh 73e7d799df i18n: add download.* keys to French and German locales
cc
2026-02-04 14:05:45 -06:00
vicrodh c9b26eb4db fix: remove $t() calls from $derived() blocks to fix PostCSS errors
vite-plugin-svelte CSS extraction fails when $t() is used inside $derived().
This causes "[postcss] Unknown word <script" errors that appear to be cache
issues but are actually a known Svelte 5 / vite-plugin-svelte incompatibility.

Files fixed:
- DownloadButton.svelte: use titleKey pattern with function resolver
- DACSetupWizard.svelte: use labelKey pattern resolved in WizardStepper
- RemoteControlSetupGuide.svelte: use labelKey pattern
- WizardStepper.svelte: support optional labelKey with $t() in template

Also added download.* translation keys to en.json and es.json.

cc
2026-02-04 14:05:18 -06:00
vicrodh 4cfde680aa chore: remove debug logging from HomeView
cc
2026-02-04 08:14:45 -06:00
vicrodh deaffa183d feat(home): add Qobuz discover playlists section with tag filter
- Add backend endpoint for /discover/playlists API
- Add PlaylistTagFilter dropdown component for filtering by genre
- Add QobuzPlaylistCard with CSS blur background effect (color-thief style)
- Add HorizontalScrollRow header snippet for custom headers with scroll controls
- Add session cache store for caching API responses
- Add i18n keys for playlist filter and discover section

cc
2026-02-03 21:37:26 -06:00
vicrodh 9341e9ee19 fix: migrate cached_artists table to include locale column
Old database schemas created before locale support was added
caused "no such column: locale" errors when fetching artists.
The migration detects this and drops the old table so it gets
recreated with the correct schema.

Fixes Top Artists section not appearing in Home view.
2026-02-03 17:11:38 -06:00
vicrodh 2818ac4d29 security: improve credential encryption and CORS configurability
Security improvements based on code review:

1. Credential Encryption (Critical)
   - Replace XOR obfuscation with AES-256-GCM encryption
   - Derive key from machine ID (tied to specific machine)
   - Add migration support for legacy XOR format
   - Automatic re-encryption on first load of legacy credentials

2. HTTPS Default (Medium)
   - Change default `secure` setting to `true` for new installs
   - Existing users keep their current setting

3. Configurable CORS Origins (High)
   - Replace hardcoded domain whitelist with SQLite-backed storage
   - Default origins: vicrodh.github.io, control.qbz.lol
   - Add commands: get/add/remove origins, restore defaults
   - Origins can be customized for third-party clients
   - Server restarts automatically when origins change

New dependencies:
   - aes-gcm: AES-256-GCM authenticated encryption
   - sha2: SHA-256 for key derivation
2026-02-03 12:36:18 -06:00
vicrodh 8e7d9de754 docs: add OpenAPI specification for Remote Control API
Add comprehensive OpenAPI 3.1 documentation covering all REST endpoints:
- Connection/auth endpoints (ping, cert)
- Playback control (play, pause, seek, volume, next, previous)
- Queue management (add, shuffle, repeat, play index)
- Search (tracks, albums, artists)
- Favorites management
- Library (album/artist details)
- Real-time updates (SSE and WebSocket)

Also add /api/docs endpoint to serve the spec when Remote Control is active.
This enables developers to build custom clients (web, CLI, mobile).
2026-02-03 11:34:04 -06:00
vicrodh 001cadcbe7 refactor(settings): move Remote Control to end, make collapsible
- Move Remote Control section to end of Settings (after Updates)
- Make section collapsible, closed by default
- Keep Experimental badge visible when collapsed
- Update nav sidebar order to reflect new position
- Remove unused .section-title-row CSS selectors
2026-02-03 11:17:40 -06:00
vicrodh 1039241d28 feat(api): add SSE endpoint for real-time playback updates
Add /api/events endpoint using Server-Sent Events (SSE) as a more
efficient alternative to WebSocket for pushing playback state updates
to PWA clients. SSE provides automatic reconnection and is simpler
to implement on the client side.

- Add tokio-stream dependency with sync feature for BroadcastStream
- Implement sse_handler with 15s keep-alive ping
- Keep /api/ws for backwards compatibility
2026-02-03 10:57:16 -06:00
vicrodh 596efc05ce feat(api): add add-to-queue-next endpoint 2026-02-03 09:31:20 -06:00
vicrodh 477258d94a feat(remote): sync shuffle/repeat between desktop and PWA
- Add shuffle/repeat fields to PlaybackEvent struct
- Emit queue:state event when shuffle/repeat changes via API
- Add queue event listener in desktop frontend
- Include shuffle/repeat in WebSocket broadcasts
- PWA updates shuffle/repeat from WebSocket messages

This enables bidirectional sync: changes from PWA update desktop UI,
and changes from desktop update PWA via WebSocket.
2026-02-03 09:22:55 -06:00
vicrodh 6b85086b0a fix(player): sync volume from backend playback events
Update the local volume state when receiving playback events from the
backend. This ensures the volume slider reflects changes made via
remote control or other external sources.
2026-02-03 09:14:52 -06:00
vicrodh b0ddf2d020 fix(player): always keep event listener active for remote control
The playback event listener was only started when currentTrack existed,
creating a chicken-and-egg problem: external playback (from PWA) couldn't
set currentTrack because the listener wasn't active to receive the event.

Now the listener is always active, allowing remote control to update the
player state even when nothing is playing locally.
2026-02-03 09:00:09 -06:00
vicrodh 21054b9f22 fix(player): update player state immediately on external track change
Call notifyListeners() right after setting currentTrack when track
changes from remote control. Also update isPlaying and currentTime
from the event to ensure player UI reflects correct state.

Added debug logging for queue track mismatches.
2026-02-03 08:39:09 -06:00
vicrodh d1347bc425 fix(player): sync queue when track changes from remote control
When a track change is detected from an external source (e.g., PWA
remote control), also sync the full queue state. This fixes the issue
where desktop UI showed empty queue after PWA started playback.
2026-02-03 08:28:39 -06:00
vicrodh 651d0b0792 chore: bump version to 1.1.8-rc-5 2026-02-03 08:28:34 -06:00
vicrodh 027d5d74d2 fix(api): emit playback events immediately to update desktop UI
Add emit_playback_update() to notify both desktop UI (Tauri event) and
PWA (WebSocket) when playback state changes from remote commands.

Previously, desktop UI would only update on the next polling cycle (up
to 5 seconds), making the remote control feel unresponsive.
2026-02-03 08:17:46 -06:00
vicrodh 0651acf1db Add playback preferences API endpoint for remote control
- GET /api/playback/preferences - get current autoplay mode
- POST /api/playback/autoplay - set autoplay mode (continue/track_only/infinite)
2026-02-03 07:54:39 -06:00
vicrodh 8e4d39684a feat(api): add album and artist detail endpoints 2026-02-03 05:52:12 -06:00
vicrodh 22834822df feat(api): add favorites and album playback endpoints
- GET /api/favorites - Get user favorites (albums, tracks, artists)
- POST /api/favorites/add - Add item to favorites
- POST /api/favorites/remove - Remove item from favorites
- POST /api/album/play - Play album (clears queue and adds all tracks)
2026-02-03 05:49:53 -06:00
vicrodh da93c746cf feat(remote-control): add setup guide wizard and experimental badge
- Add RemoteControlSetupGuide component with step-by-step instructions
- Include certificate installation guides for iOS, macOS, Windows, Android
- Mark remote control section as "Experimental" with red badge
- Add Setup Guide button to open the wizard
- Add translations for wizard (en/es)
2026-02-03 05:38:20 -06:00
vicrodh 4972c76746 feat(api): add search_all endpoint for combined search
- GET /api/search/all returns albums, tracks, and artists
- Parallel search queries for better performance
- Respects artist blacklist filtering
2026-02-03 05:31:38 -06:00
vicrodh a775dda14d feat(api): add shuffle and repeat endpoints
- POST /api/queue/shuffle - set shuffle mode
- POST /api/queue/repeat - set repeat mode (off/all/one)
- Return current shuffle/repeat state in response
2026-02-03 05:30:10 -06:00
vicrodh fd4445c8ce feat(api): add queue management endpoints
- GET /api/queue - get full queue state
- POST /api/queue/add - add track to queue
- POST /api/queue/play - play specific track by index
2026-02-03 05:18:17 -06:00
vicrodh 53b9031c36 fix(player): sync track changes from remote control
When tracks are changed externally (via PWA remote control), the desktop
player now detects the track_id mismatch and fetches the new track info
from the backend queue. This fixes bidirectional sync where skipping
tracks on the PWA wasn't reflected in the QBZ desktop UI.
2026-02-03 05:16:17 -06:00
vicrodh 4d2227cb5b fix(remote-control): initialize rustls provider
cx
2026-02-03 04:55:22 -06:00
vicrodh 229d24f891 feat(remote-control): add HTTPS mode and cert flow
cx
2026-02-03 04:48:23 -06:00
vicrodh b906f747fa Merge feature/internal/qbz-control: Remote Control API
Features:
- Axum REST API server for remote control
- WebSocket real-time playback updates
- Token-based authentication with QR pairing
- LAN-only security middleware
- Settings UI for enabling/configuring remote control
2026-02-03 03:52:06 -06:00
vicrodh 0fc6494332 Merge fix/general-debug-1.1.7: DAC Setup Wizard improvements
Features:
- Redesigned welcome step with comprehensive disclaimer
- Added DAC info extension to all wizard steps
- Fixed stepper navigation when going backwards
- Added custom gandalf tooltip with nerdy text
- Applied ChatGPT micro-adjustments (warnings, hints)
- Full i18n support (EN/ES/FR/DE)
2026-02-03 03:51:11 -06:00
vicrodh 363ca4c264 feat(remote-control): add LAN API server, settings UI, and QR pairing\n\n- add axum API server with LAN-only + token auth + CORS allowlist\n- expose playback and search endpoints plus WS updates\n- persist remote control settings (enabled/port/token)\n- add settings UI with QR/token controls and i18n\n\ncx 2026-02-03 03:47:48 -06:00
vicrodh 2f85129547 feat(dac-wizard): apply ChatGPT micro-adjustments
Step 1 (Precheck):
- Add inactive warning: "If any service is inactive, stop here..."

Step 2 (Other distro):
- Change to "Ensure these packages (or equivalents) are installed"

Step 3 (Detect DAC):
- Add input warning: "This must match exactly..."

Step 4 (Backup):
- Update hint about user responsibility for keeping backup

Step 6 (Pulse):
- Change "browsers" to "browsers and apps"

Step 7 (WirePlumber):
- Add rules note: "These rules apply only to the detected DAC"

All translations updated for EN/ES/FR/DE
2026-02-03 03:15:59 -06:00
vicrodh dbe70e774c style(dac-wizard): make tooltip text friendlier and nerdier
- Reference "The Hi-Fi Wizard/Mage" for the gandalf icon
- Add "if you haven't already" to acknowledge power users
- Keep it playful without being patronizing
2026-02-03 03:07:15 -06:00
vicrodh d99611ef46 feat(dac-wizard): improve button size and add custom tooltip
- Match button height to dropdown (40px)
- Increase gandalf icon size (24px) for better visibility
- Add custom hover tooltip with larger gandalf icon
- Tooltip shows title and description explaining the wizard
- Add tooltip translations for EN/ES/FR/DE
2026-02-03 03:04:11 -06:00
vicrodh 8ef38c67e0 feat(dac-wizard): redesign welcome step and fix stepper navigation
Welcome step changes:
- Add comprehensive disclaimer with bullet points
- Add system requirements caveats (custom configs, manual mods, etc.)
- Add recovery information
- Update translations for EN/ES/FR/DE

Bug fixes:
- Fix stepper not updating when navigating backwards
  (current step now always shows as 'active')

UI changes:
- Replace Wand2 icon with gandalf.svg for DAC wizard button
2026-02-03 02:59:34 -06:00
vicrodh e6d5c1ae7d feat(dac-wizard): extend DAC info to all steps and done summary
- Add DAC short name to pulse config filename for multi-DAC support
- Add getCreatedConfigPaths() for dynamic file path generation
- Show configured DAC name/description in done step
- Add configuredFor translation to all locales (EN/ES/FR/DE)
2026-02-03 02:38:49 -06:00
vicrodh c3ae0a2e6a fix(dac-wizard): use DAC name in PipeWire config filename 2026-02-03 02:31:57 -06:00
vicrodh fb85ee2de4 feat(dac-wizard): add sample rate checkboxes and DAC-specific config files
Step 5 (PipeWire config):
- Add sample rate checkboxes (44.1, 48, 88.2, 96, 176.4, 192 kHz)
- Pre-fill from DAC query if available, otherwise empty for manual selection
- Show "detected" badge for rates found by query
- Dynamic command updates based on selection

Step 7 (WirePlumber config):
- Use DAC short name in filename: 99-qbz-dac-{name}.conf
- Extract name from node.name or description
- Include DAC description in config file comment
- Use selected sample rates instead of hardcoded values

This enables proper multi-DAC separation - each DAC gets its own config file.
2026-02-03 02:25:12 -06:00
vicrodh 02d79b13b5 fix(dac-wizard): fix step label translation for kebab-case names 2026-02-03 02:16:29 -06:00
vicrodh a5a2100a2a feat(dac-wizard): add mandatory checkboxes for steps 1 and 4
- Welcome step: checkbox to confirm understanding of system changes
- Backup step: checkbox to confirm backup was created
- Start/Next buttons disabled until checkboxes are checked
- Add translations for checkboxes (EN/ES/FR/DE)
2026-02-03 02:07:05 -06:00
vicrodh b20934b7c7 fix(dac-wizard): query ALSA hardware for real sample rates
- Clear default input value (use empty string)
- Add ALSA hardware capabilities query via:
  - /proc/asound/cardX/stream0 for USB devices
  - aplay --dump-hw-params for detailed hw params
- Parse rate ranges [min max] and expand to common rates
- Now shows actual DAC capabilities, not just current config
2026-02-03 02:00:15 -06:00
vicrodh 278136762d feat(dac-wizard): add DAC capabilities query from PipeWire/PulseAudio
Backend (Rust):
- Add query_dac_capabilities command that queries pw-cli and pactl
- Returns supported sample rates, formats, channels, and device description
- Parses both PipeWire and PulseAudio outputs for maximum compatibility

Frontend (Svelte):
- Add "Query DAC Capabilities" button in detect-dac step
- Display detected sample rates, formats, channels
- Show disclaimer about checking manufacturer docs if values don't match
- Add translations for query UI (EN/ES/FR/DE)
2026-02-03 01:47:42 -06:00
vicrodh 5ce5a57d5b feat(dac-wizard): add node name validation and DAC type detection
- Validate node.name format (alsa_output.* or alsa_input.*)
- Detect DAC type: USB, PCI, Bluetooth, Virtual
- Show visual feedback with color-coded status:
  - USB DAC: green (bit-perfect supported)
  - PCI: yellow (depends on hardware)
  - Bluetooth/Virtual: red (not possible)
- Add translations for validation messages (EN/ES/FR/DE)
2026-02-03 01:41:40 -06:00
vicrodh 8e74689226 fix: settings menu expands upward in collapsed sidebar
- Remove redundant subtitle text from DAC wizard welcome (all languages)
- Fix collapsed sidebar settings menu to expand upward instead of down
- Menu now opens to the right and grows upward, avoiding player overlap
2026-02-03 01:27:59 -06:00
vicrodh e11f943bbb chore: move qobuz-player to end of app list 2026-02-03 01:21:08 -06:00
vicrodh afc61b3660 feat(i18n): add FR/DE translations for DAC wizard, add qobuz-player app
- Add complete French (FR) translations for dacWizard section
- Add complete German (DE) translations for dacWizard section
- Add qobuz-player (TUI) to bit-perfect app selector in all 4 languages
2026-02-03 01:18:57 -06:00
vicrodh d8f72ff318 feat: add DAC Setup Wizard for PipeWire bit-perfect configuration
- Add guided 10-step wizard for manual PipeWire/WirePlumber configuration
- Steps: welcome, precheck, detect-dac, backup, pipewire-config,
  pulse-config, wireplumber-config, restart, verify, done
- Users manually copy and run commands (no automatic execution)
- Include rollback instructions with documentation links on error
- Add wizard trigger button in Settings (visible when PipeWire selected)
- Support multiple distros: Debian, Fedora, Arch, openSUSE
- Add bit-perfect app selector for QBZ, VLC, DeaDBeeF, etc.
- Full i18n support (EN/ES translations)
2026-02-03 01:12:56 -06:00
vicrodh 6104bbf09d feat: add Ctrl+F keybinding for search focus
- Add 'nav.search' action with Ctrl+F default shortcut
- Add focusSearch() export to Sidebar that clears and focuses search
- Add translations for en/es (Search / Buscar)
- Register action handler in +page.svelte
2026-02-02 23:47:41 -06:00
vicrodh 18537f9899 feat: add dropdown menu to UserCard with settings, keybindings, bug report, about
- Replace single settings button with dropdown menu in UserCard
- Menu opens upward in expanded mode, to the right in collapsed mode
- Use openUrl from Tauri plugin for external links (bug report)
- Make dropdown compact (similar to context menu) and wider
- Pass onKeybindingsClick prop through Sidebar to +page.svelte
- Support collapsed prop in UserCard for sidebar collapsed mode
2026-02-02 23:43:45 -06:00
vicrodh d2913f0c0c feat(keybindings): add shortcut configuration UI (Phase 4)
- Create ShortcutInput.svelte with recording mode and conflict detection
- Create KeybindingsSettings.svelte modal for customizing shortcuts
- Integrate settings modal accessible from shortcuts modal
- Add i18n translations for configuration UI (en/es)
- Visual indicators for modified shortcuts
- Reset individual or all shortcuts to defaults
2026-02-02 23:24:08 -06:00