When switching from PipeWire to ALSA Direct, PipeWire holds the ALSA
device open causing EBUSY on the first snd_pcm_open. Now detects
DeviceBusy, suspends the PipeWire sink via pactl, waits 200ms for
release, then retries. Applied to both hw and plughw paths.
v2_get_hardware_audio_status was reading sample_rate/bit_depth from the
legacy player state, which is never updated since playback runs through
the V2 player (CoreBridge). Now reads from V2 player first, falls back
to legacy only if CoreBridge isn't initialized yet.
cpal 0.15 returned "ALSA" from HostId::name(), cpal 0.17 returns "Alsa"
(now uses stringify! on the enum variant). Use eq_ignore_ascii_case()
for the comparison so it works regardless of cpal version.
Query the DAC's supported sample rates from /proc/asound/cardN/stream0
(maps PipeWire sink to ALSA card via pactl). If the track's native rate
isn't supported (e.g., 176.4kHz), fall back to the nearest rate in the
same family (e.g., 88.2kHz). Rodio resamples from track rate to stream
rate automatically, so audio plays instead of producing silence.
The OAuth login path in runtime_bootstrap was missing the audio settings
sync code that exists in the email/password path. Users logging in via
OAuth had backend_type remain None, causing legacy CPAL fallback and
requiring manual settings reconfiguration on every startup.
rodio 0.22's with_supported_config() resets buffer_size to Default via
..Default::default(), so our BufferSize settings in StreamConfig were
never reaching CPAL. MixerDeviceSink has zero internal buffering, making
CPAL's buffer the ONLY buffer between the mixer and audio hardware.
Chain .with_buffer_size(Fixed(sample_rate/10)) AFTER with_supported_config()
to actually pass ~100ms buffer to CPAL, matching old vendored cpal behavior.
PipeWire manages its own buffer scheduling via quantum. Forcing a fixed
buffer size (sample_rate / 10 = 19200 frames at 192kHz) conflicts with
PipeWire's internal scheduling and causes buffer underruns that produce
audible noise.
BufferSize::Fixed is kept only for:
- Exclusive mode (512 frames, low latency)
- ALSA backend (direct ALSA, not through PipeWire)
rodio 0.22's MixerDeviceSink has an internal mixer thread that cannot
synchronize with PipeWire's forced quantum scheduling. This caused
massive buffer underruns (600+) at sample rates >= 88.2kHz when Force
Bit Perfect was enabled.
clock.force-rate alone is sufficient for bit-perfect sample rate
switching. Logs confirm zero underruns at 88.2kHz and minimal underruns
at 192kHz (only during heavy I/O) when quantum is not forced.
Replace BufferSize::Default with BufferSize::Fixed(sample_rate / 10)
for non-exclusive mode. This preserves the 100ms period tuning that was
previously applied in the vendored cpal ALSA backend, reducing CPU
wakeups during playback.
- OutputStream/OutputStreamHandle -> DeviceSinkBuilder/MixerDeviceSink
- Sink -> Player (as RodioPlayer)
- current_frame_len -> current_span_len in all Source impls
- Source::channels() returns NonZero<u16>, sample_rate() returns NonZero<u32>
- SamplesBuffer no longer generic, constructor takes NonZero args
- SampleRate is now u32 type alias (no tuple struct)
- Decoder::new_mp4 no longer takes Mp4Type hint
- Applied across both crates/ workspace and src-tauri/ legacy code
Remove vendored rodio and cpal from src-tauri/vendor/ since rodio 0.22
now includes upstream f32 decoder support (our vendored modification).
Update all Cargo.toml files to use rodio 0.22 from crates.io and remove
the [patch.crates-io] section.
Handle RunEvent::Exit (fires on SIGTERM from tauri dev hot reload)
to stop audio playback and visualizer before process teardown. The
previous CloseRequested handler only fires on user-initiated close,
not on SIGTERM, leaving ALSA/CPAL C threads active during cleanup
which causes "free(): corrupted unsorted chunks" heap corruption.
- Switch from .run(context) to .build(context).run(callback)
- Stop visualizer and both legacy/V2 players on Exit event
- Destroy miniplayer window on Exit event
Replace browser-side pdfjs-dist canvas rendering with server-side
MuPDF rendering for high-quality PDF booklet display. MuPDF renders
pages to PNG at configurable DPI in Rust, producing much sharper
results than the JavaScript canvas approach which had persistent
JPEG 2000 WASM decoder issues.
- Add mupdf crate with sys-lib features (avoid GTK symbol conflicts)
- Create pdf_viewer.rs with v2_booklet_open/render_page/close commands
- Download PDF to temp file, render pages on demand via MuPDF
- Display rendered PNGs as img tags instead of canvas
- DPI scales with zoom and devicePixelRatio for crisp output
- Support rotation via MuPDF transformation matrix
The worker was loaded via Vite's blob: URL transform, which
prevented it from resolving sibling WASM files (openjpeg.wasm,
jbig2.wasm). Now the worker is served from static/pdfjs/ as a
real HTTP resource alongside the WASM files, so JPEG 2000 and
JBIG2 decoders initialize correctly.
Removed disableWorker hack — worker runs properly now.
PDF was rendering tiny because zoom=1 means 1 PDF point = 1 CSS
pixel. Now calculates zoom to fill the container width on load.
Fit-to-width button does the same recalculation.
pdfjs v5 checks GlobalWorkerOptions.workerSrc before reading
document options like disableWorker. Set it to satisfy the
init check even though the worker is disabled per-document.
The web worker runs in a blob: URL context where /pdfjs/ WASM
paths don't resolve, causing JPEG 2000 images to decode at
degraded quality. Disable worker so all decoding runs on the
main thread where static assets are reachable.
Also bumped render scale from 2x to 3x for near-print quality.
First page was black because renderPage() ran while isLoading was
still true, so the canvas wasn't in the DOM yet. Fixed by setting
isLoading=false and awaiting tick() before rendering.
Increased render quality from 1.5x to 2x DPR multiplier for
sharper booklet pages.
PDF booklets use JPEG 2000 images which require OpenJPEG WASM.
Copy pdfjs-dist WASM files to static/pdfjs/ so they are served
at a known URL, and set wasmUrl parameter on getDocument().
PDF loading was failing because pdfjs-dist cannot fetch from
static.qobuz.com due to CORS restrictions in the WebView.
Added v2_fetch_url_bytes command that fetches URL bytes through
Rust's reqwest (no CORS), then passes the binary data to pdfjs.
Also added rotation support (R key or toolbar button) for
vertical booklets.
Modal PDF viewer for album booklets with page navigation,
zoom controls, and keyboard shortcuts. Uses pdfjs-dist to
render PDF pages from URL in canvas.
All animations default to 60fps. Each panel reads its own setting
from userStorage via shared fpsConfig utility. Settings UI shows
a collapsed section with per-panel dropdowns:
- Background Blur, Spectrum, X/Y (Lissajous), Oscilloscope,
Energy Bands, Transient Pulse, Album Reactive, Spectral Ribbon
Options: Disabled, 15, 30, 60, 120 FPS
i18n keys added to all 4 locales (en, es, de, fr)
WebKit's WebProcess was crashing (SIGABRT) during EGL/GPU resource
cleanup when the app exited with the miniplayer window still alive.
Now explicitly destroy the miniplayer window before the main process
exits, giving WebKit time to clean up gracefully.
Remove unnecessary get() wrapper from svelte/store when calling the
i18n translate function. Direct $t() works correctly in regular
functions (only $derived is problematic per ADR-001). Removes unused
get import from GenreFilterButton, FavoritesView, PlaylistDetailView,
PurchaseAlbumDetailView, PurchasesView, and SettingsView.
Add dev-ghost-doctor.sh (t-shadow check + runtime clean + restart) and
dev-ultra-restore.sh (deep clean with --full/--no-start/--check flags).
Improve check-no-t-shadow.sh patterns for broader t-variable detection.
Clean-dev-runtime now runs guardrail check automatically. Remove --force
from vite dev. Add npm script shortcuts for all new tools.
- Allow dead_code on TokenValidationResponse.code (deserialized but not read)
- Remove unused MusicProvider import in commands_v2.rs
- Restore #[allow(non_snake_case)] on v2_plex_cache_get_tracks
- Replace drop(tokens) with let _ = tokens (drop on reference is no-op)
Mirror the album cover context menu options: right-clicking the artist
photo now shows Open in Browser and Save As below the existing
custom image options, separated by a divider.
Detect maximized state via Tauri window API. When the window is not
maximized (floating), apply 8px border-radius and a soft box-shadow.
Body/html backgrounds set to transparent so corners show through
the Tauri transparent window.
Remove isFavoriteOverride={true} that forced all hearts filled,
preventing the toggle from having any visible effect. Subscribe to
favoritesStore so unfavorited tracks animate out (slide+fade) and
are removed from the list after 300ms without requiring a refresh.
Shuffle favorite artists randomly so all get a fair chance (was
deterministic, first artist dominated). Cap at 2 albums per artist.
Shuffle final results for variety on each load.
Add #[allow(non_snake_case)] to V2 command functions and structs that
use camelCase parameter names for Tauri frontend compatibility.
Renaming to snake_case would break the frontend-backend contract.
Replace scroll-based section navigation with tab-based rendering where
only one section is visible at a time. Merge Offline Mode into Downloads
tab. Move Remote Control into Developer tab. Uncollapse previously
collapsed sections (Downloads, Storage, Developer). Add Developer to
nav tabs.
When the titlebar search is active, the search input inside SearchView
is redundant. Hide it so only the tabs and results remain. The query
still syncs from the titlebar via the shared searchState store.
Search input can now live in the titlebar instead of the sidebar,
controlled by a new toggle in Settings > Appearance. When the custom
titlebar is hidden or system titlebar is active, search stays in the
sidebar regardless of the toggle.
- New searchBarLocationStore with localStorage persistence
- TitleBar accepts search props and exposes focusSearch()
- Sidebar hides its search container when titlebar search is active
- Ctrl+F focuses the active search input in both modes
- Titlebar height increased from 32px to 36px to fit the search field
- Translations added to all 4 locale files (en, es, de, fr)
Rename t -> item/track in .map()/.filter() callbacks in
favoritesStore.ts and queueStore.ts to comply with ADR-001
and prevent intermittent PostCSS extraction failures.
cc
Expand the sidebar automatically when Ctrl+F is pressed while it's
collapsed. Also replace setTimeout with Svelte's tick() in focusSearch
to properly wait for DOM updates before focusing the input.
Closes#124
cc
Playlist search tab was invoking legacy 'search_playlists' command
which no longer exists. Updated both initial search and load-more
to use 'v2_search_playlists', matching the other search tabs.
Closes#129
cc
Previously, the section displayed the user's own favorite albums — the
same albums they had already marked as favorites. Now it resolves the
artists behind those favorite albums (and favorite tracks), fetches
their catalogs from the Qobuz API (parallel, max 8 artists, 25 albums
each), and filters out albums the user already has in favorites or
recently played. Results are cached in reco_album_meta for instant
future lookups.
Closes#122
After clicking Add to Local Library, the in-memory download state is
cleared so the progress bar and button disappear. Also triggers a
background scan of the added folder so the library indexes the new
files without requiring a manual refresh.
Download checkmarks now only show for the currently selected format.
In-memory store tracks formatId per album download, and the album
detail view checks track.downloaded_format_ids from backend against
the selected format dropdown. Switching quality hides checkmarks
from a different format's downloads.
Migrate downloaded_purchases to compound PK (track_id, format_id) so
the same track downloaded in MP3 and FLAC are tracked separately.
Album detail endpoint now returns downloaded_format_ids per track.
Album detail view now checks track.downloaded (from SQLite) in
addition to in-memory session status, so checkmarks survive restart.
Track numbers are no longer replaced by checkmarks -- the number
column always shows the track number (spinner only while downloading),
and the download column handles all status indicators.
Green checkmark on downloaded tracks now shows a download icon on
hover, allowing users to re-download in a different format or
location. Applied to both the Purchases track list and album detail.
When downloading a single track from the Purchases tab, if multiple
formats are available a popup lets the user choose before the folder
picker opens. Single-format tracks proceed directly as before.
Quality folder was being prepended to the destination path by the
frontend, resulting in Quality/Artist/Album/track. Now quality_dir
is passed as a separate parameter through the full stack and inserted
between album and filename by the backend path builder.
The metadata call used getPurchaseIds(1, 0) without a type filter.
With limit=1 the Qobuz API returns only the first type's total,
leaving the other at 0. Now fetches totals per type separately in
parallel so both counters are correct from mount.
Closes#112
Login responses were serialized as full objects (user_id, subscription,
tokens). Track play logs dumped the entire QobuzTrack/Track object which
may include signed CDN URLs. Now only log the minimum needed for
debugging (success booleans, track id + title).
This likely caused the 0x0.st 451 rejection when users tried to upload
their console logs for bug reports.
Both stores read getUserItem() at module load time when the userId is
still null, so they hit the unscoped localStorage key. After login,
writes go to the user-scoped key (qbz.{userId}.key) which is never
read back on the next restart.
Add rehydrate functions that re-read from localStorage after
setStorageUserId() + migrateLocalStorage() have run, matching the
existing resyncPersistedVolume() pattern.
Closes#113
The click-outside logic used `el && !el.contains(target)` which
short-circuits to falsy when submenu refs are null (not rendered),
preventing the menu from ever closing. Changed to `!el || !el.contains()`
so a null ref correctly counts as "outside". Also added missing
radioSubmenuEl to the check.
Closes#120
Right-click on album artwork shows context menu with:
- Add/Change/Remove custom album cover
- Open in browser
- Save as...
Also adds v2_save_image_url_to_file backend command.
cc
v2_library_set_custom_album_cover: resize, cache, store in db
v2_library_remove_custom_album_cover: delete files + db entry
v2_library_get_all_custom_album_covers: bulk load for frontend store
cc
- Add flac; keyword to all .desktop files (was only in deb template)
- Add StartupNotify=true to flatpak .desktop files (was missing)
- Add Keywords line to snap .desktop (was missing entirely)
- Unify shortDescription to match other .desktop Comment fields
cc
GDK_DPI_SCALE is a float multiplier that works on X11, XWayland, and
native Wayland. Previously it was only applied when force_x11 was
enabled, leaving native Wayland users with no way to compensate for
their DE scale factor from within the app.
- Move GDK_DPI_SCALE application out of the force_x11 block in main.rs
- Show the DPI Scale setting in the UI for all backends (not gated
behind the Force X11 toggle)
- GDK_SCALE remains XWayland-only (integer, not useful on Wayland)
- Setting is already persistent in graphics_settings.db
- Add window_width, window_height, is_maximized columns to window_settings DB
with automatic migration for existing installs
- Restore saved size on startup; restore maximized state after window creation
- Save non-maximized size on every Resize event
- Save maximized flag on CloseRequested
- Default remains 1280x800 for first launch
- Remove require_tos_accepted gate from all login commands
(v2_auto_login, v2_manual_login, v2_start_oauth_login, v2_login)
- Call accept_tos_best_effort after each successful session activation
so the value is persisted the moment login succeeds
- Re-initialize LegalSettingsStore in accept_tos_best_effort if torn
down (e.g. after factory reset that deletes legal_settings.db)
- Bootstrap ToS check now fails open (unwrap_or(true)) so saved
credentials still trigger auto-login after a factory reset
The frontend checkbox already gates the UI; the backend gate was
causing double-failures when the DB was unavailable post-factory-reset.