Commit Graph
877 Commits
Author SHA1 Message Date
vicrodh 05f1a5ec13 chore: bump version to 1.1.19
- Cargo.toml, tauri.conf.json, package.json, snapcraft.yaml
- Regenerate Cargo.lock and package-lock.json
- Add metainfo release entry for 1.1.19
2026-03-09 00:35:42 -06:00
vicrodh 26f20ceb3f fix: resolve tauri version mismatch and track Cargo.lock
- Update @tauri-apps/api from 2.9.1 to 2.10.1 (matches Rust crate 2.10.x)
- Update @tauri-apps/cli from 2.9.6 to 2.10.1
- Remove Cargo.lock from .gitignore (binary projects should track it)
- Fixes build errors for distro packagers (NixOS, etc.)

Closes #151
2026-03-09 00:23:49 -06:00
vicrodh a07ee71090 feat: tag-scoped thumbs down for discovery recommendations
Add dismissal system for "You May Also Like" discovery artists. Dismissals
are scoped to the genre tag used for the search, so dismissing AC/DC from
electronic recommendations won't affect metal recommendations.

- New discovery_dismissals table in reco DB (tag + normalized artist name)
- v2_dismiss_discovery_artist command persists dismissal per tag
- Discovery pipeline filters dismissed artists for both primary and secondary tags
- Backend returns 8 results (frontend shows 6, keeps 2 reserves)
- Thumbs-down button appears on hover, instantly replaces with reserve
- Returns primaryTag in DiscoveryResponse for frontend dismiss context
2026-03-08 22:49:06 -06:00
vicrodh 776987856a fix: tray icon path for Flatpak and titlebar double-click maximize
- Fix Flatpak tray icon path (com.blitzfc.qbz, not com.blitzkriegfc.qbz)
- Fix titlebar double-click: prevent JS handler from firing on native
  drag regions, which caused double toggleMaximize (maximize then
  immediate restore)
- Improve tray click handlers to properly detect minimized state
2026-03-08 21:43:30 -06:00
vicrodh 572d23b935 feat: replace ListenBrainz co-listening with MusicBrainz tag-based discovery
ListenBrainz similar-artists returned mainstream crossover artists (SOAD,
Led Zeppelin for Metallica) instead of genre-accurate results. Now uses
MusicBrainz tag search to find artists sharing the seed's primary genre tag
(e.g. "thrash metal" returns Megadeth, Slayer, Kreator, etc).

- Add search_artists_by_tag to MusicBrainz client
- Deterministic shuffle using seed MBID hash for variety across artists
- Secondary tag fallback when primary yields fewer than 5 results
- Rename label to "You May Also Like", limit results to 6
- Add Last.fm get_similar_artists method (unused, for future use)
- Add tags field to ArtistFullResponse model
- Tighten local history exclusion to play_count > 2
2026-03-08 21:30:01 -06:00
vicrodh cd0615350f refactor: switch discovery to ListenBrainz Labs similar-artists API
Replace lb-radio endpoint (popularity-based) with Labs similar-artists
POST endpoint that returns actual similarity scores. Add 85% threshold
filtering and expose similarityPercent field in DiscoveryArtist model.
2026-03-08 15:47:17 -06:00
vicrodh 501546fb55 feat: add ListenBrainz discovery pipeline for Artist Network sidebar
Add v2_get_discovery_artists command that uses ListenBrainz lb-radio API
to find novel artist recommendations. Pipeline: fetch candidates from
ListenBrainz, filter out seed/similar/local-history artists, resolve on
Qobuz, filter blacklisted, return top 8 by affinity score.
2026-03-08 14:51:30 -06:00
vicrodh 309c4b2cc2 fix: clear reco meta caches when image cache is cleared
When the user clears the image cache from settings, also clear
reco_album_meta, reco_track_meta, and reco_artist_meta tables.
This forces re-resolution from Tier 2/3 with the correct (small)
image URLs instead of keeping stale large (600px) URLs in Tier 1.
2026-03-08 12:56:35 -06:00
vicrodh 63b1161afe perf: optimize ML/reco module for home view loading
- Add composite indexes on reco_events for GROUP BY + ORDER BY queries
  (event_type + album_id/track_id/artist_id + created_at DESC)
- Add composite index on reco_scores for scored lookups
  (score_type + item_type + score DESC)
- Eliminate duplicate fallback queries in get_home_seeds_internal
  by inlining the empty check into the scored branch
- Parallelize resolve_favorites with recent albums, tracks, and
  artists (4-way tokio::try_join instead of 3 + sequential)
- Batch cache writes: collect all Tier 3 API results first, then
  write to API cache and reco meta with single lock acquisitions
  instead of locking per-item inside spawned tasks
2026-03-08 12:52:52 -06:00
vicrodh 8a2c12ee41 perf: parallelize artist resolution and use small images for cards
Resolve albums, tracks, and artists concurrently with tokio::try_join
instead of sequentially. Artists were waiting behind album/track
resolution unnecessarily. Also change get_image() to prefer small
(230px) over large (600px) for card contexts, reducing download size.
2026-03-08 12:41:00 -06:00
vicrodh e8d6aa4f4f feat: add image cache backend with LRU eviction
- ImageCacheService: disk-based cache keyed by MD5 hash of URL
- LRU eviction by last-access time (not creation time)
- ImageCacheSettings: configurable max size (default 200MB), can disable
- v2 commands: get_cached_image, get/set settings, stats, clear cache
- Cache stored at ~/.cache/qbz/images/ with SQLite metadata
2026-03-08 10:37:42 -06:00
vicrodh 57702afc37 fix: respect force_dmabuf as full GPU opt-in for compositing too (#127)
When user enables Force DMA-BUF in Developer Settings, skip the
NVIDIA+Wayland compositing disable. This setting signals "I want
full GPU acceleration" and should grant both DMA-BUF and compositing.
2026-03-08 09:43:57 -06:00
vicrodh 4a4a9a4213 fix: defensive graphics fixes for Flatpak Wayland blur stutter (#127)
- Detect Flatpak sandbox at startup and log it
- In Flatpak on Wayland, unset DISPLAY to prevent WebKitGTK from
  falling back to XWayland internally (causes CPU-GPU texture
  round-trips that degrade CSS blur performance)
- Per-GPU Wayland paths: only disable compositing and DMA-BUF for
  NVIDIA on Wayland. AMD/Intel get full GPU acceleration on native
  Wayland (compositing enabled, DMA-BUF enabled)
- Change GitHub Releases Flatpak manifest from --socket=x11 to
  --socket=fallback-x11 to match Flathub and prevent XWayland
  on Wayland sessions
2026-03-08 09:32:56 -06:00
vicrodh 976fa201d5 docs: update README and link resolver comment for Spotify embed scraping
Remove Spotify API credential setup from README since playlist import
now uses embed scraping. Update resolve_via_odesli_and_search doc
comment to reflect the new Spotify data path.
2026-03-06 13:33:36 -06:00
vicrodh 727e5288e7 refactor(spotify): remove API dependency, use embed scraping only
Spotify client_credentials API access ends 2026-03-06. Remove all
API token/proxy code and the paginated fetch_playlist_with_token
function. Playlist imports now go straight to embed page scraping
(limited to ~50 tracks, no ISRC/album data).

Link resolver for Spotify tracks/albums also switched from API to
embed page scraping via new fetch_embed_metadata function.

Remove Spotify credentials from .env.example since they are no
longer needed.
2026-03-06 13:30:44 -06:00
vicrodh 786ce883ac fix(library): extract track/disc number from file tags during backfill import
insert_qobuz_cached_track_direct was hardcoding track_number to 0,
causing all imported tracks to show wrong numbers. Now accepts
track_number and disc_number params, and both callers (backfill
downloads and offline cache sync) extract metadata from the audio
file via MetadataExtractor before inserting.

Also fix LocalLibraryView to use || instead of ?? for track_number
fallback, so 0 correctly falls back to index-based numbering.

Closes #147
2026-03-06 11:08:32 -06:00
vicrodh 5b9f5a75c2 feat(ui): add explicit content badge across entire app
Display parental_warning badge (E icon) next to track titles in all
views: TrackRow, QueuePanel, NowPlayingBar, ImmersivePlayer with all
13 visualizer panels, MiniPlayer surfaces, and AlbumDetailView.

Propagate parental_warning field through the full data chain from
Rust backend (qbz-models, queue, commands_v2, session_store, API
server) to frontend stores, adapters, and UI components. Badge uses
CSS mask technique with explicit.svg for theme compatibility.
2026-03-06 08:48:51 -06:00
vicrodh 01fc32e611 feat(audio): enable gapless playback on ALSA Direct and default ON
ALSA Direct playback thread now supports gapless via mpsc channel:
when current source ends, it checks for a queued next source and
transitions seamlessly without draining the PCM buffer.

Format mismatch still blocks gapless (bit-perfect has priority).
Gapless now defaults to enabled for all backends.
2026-03-05 11:45:32 -06:00
vicrodh f1e2c99b5b fix(audio): hot-reload gapless and normalization settings to player
v2_set_audio_gapless_enabled, v2_set_audio_normalization_enabled, and
v2_set_audio_normalization_target now call player.reload_settings()
after writing to SQLite, so changes take effect immediately without
requiring an app restart.
2026-03-05 11:19:50 -06:00
vicrodh 43df8a40e4 fix(purchases): restructure download paths to Artist/Album [FORMAT][Quality]/track
Embeds quality in album folder name instead of subfolder, so each
quality variant appears as a separate album in the local library.
Adds download error toast and fixes format labels to bracket notation.
Closes #116
2026-03-05 11:12:39 -06:00
vicrodh d431581f16 fix(notifications): normalize ashpd artwork icon payload
Normalize notification artwork to square PNG (max 512x512, <=4 MiB) before sending Icon::Bytes via ashpd portal, so album art renders reliably without legacy fallback.\n\ncx
2026-03-03 23:31:31 -06:00
vicrodh 70adee9f16 fix(notifications): restore album artwork via native D-Bus path
The XDG portal notification spec's icon field doesn't support inline
album artwork the way freedesktop Notifications does with image-path.

Dual-path approach:
- Native (non-Flatpak): use org.freedesktop.Notifications D-Bus
  interface directly with image-path hint for album artwork
- Flatpak (sandboxed): use ashpd portal (Flathub requirement)

Uses ashpd::is_sandboxed() for detection and ashpd's re-exported
zbus for the direct D-Bus call, avoiding extra dependencies.
2026-03-03 22:46:43 -06:00
vicrodh d3cad99bd9 fix(notifications): send artwork as bytes instead of file URI
The XDG portal was not displaying album artwork when passed as a
file:// URI (showed KDE default icon instead). Send artwork as
Icon::Bytes so the portal receives the image data directly.
2026-03-03 22:41:08 -06:00
vicrodh 69aed4e1ad feat(notifications): migrate from notify-rust to ashpd XDG Portal
Replace direct D-Bus notifications (notify-rust) with XDG Desktop
Portal notifications (ashpd) for Flathub compliance. Portal
notifications use the app's .desktop file identity and don't require
--talk-name=org.freedesktop.Notifications permission.

- Replace notify-rust dep with ashpd (linux-only, tokio+notification)
- Use NotificationProxy for portal-based notifications
- Use stable ID "track-now-playing" to replace instead of stacking
- Convert artwork path to file:// URI via ashpd::Uri
- Graceful fallback when portal is unavailable
2026-03-03 22:25:59 -06:00
vicrodh 00675de6b8 feat(snap): add snap sandbox detection and welcome modal wiring
Detect when QBZ runs inside a Snap sandbox (via SNAP env var) and show
a one-time welcome modal with required plug connection commands. Adds a
Snap Sandbox section in Settings with copyable commands, mirroring the
existing Flatpak pattern.

Backend: snap.rs module, DB table snap_welcome_shown, V2 commands.
Frontend: updatesService, +page.svelte modal queue, SettingsView section.
2026-03-02 11:10:50 -06:00
vicrodh b49d0b3e3b chore(release): bump version to 1.1.19-rc-1
cx
2026-03-01 18:59:24 -06:00
vicrodh 55a1ef25e6 fix(ui): polish mini/immersive layout and queue favorite behavior
cx
2026-03-01 18:56:23 -06:00
vicrodh 9c6265abd8 fix(linux): default main window to opaque for shutdown stability
cx
2026-03-01 17:21:49 -06:00
vicrodh 75254d26a9 fix(linux): apply WebKit EGL shutdown stability workarounds
cx
2026-03-01 17:13:42 -06:00
vicrodh b95edec754 fix(shutdown): avoid forced exit(0) during main window close
cx
2026-03-01 16:55:16 -06:00
vicrodh 1054e71768 fix: populate downloaded_format_ids in all purchase endpoints
v2_purchases_get_all and v2_purchases_get_by_type only set the
downloaded boolean but never populated downloaded_format_ids, so
check marks disappeared after app restart. Now both use
get_downloaded_purchase_formats() and build the format map, matching
the behavior already present in v2_purchases_get_album.

Fixes #119
2026-03-01 16:11:04 -06:00
vicrodh 7d8e8fadcf feat: add qbz --autoconfig-graphics diagnostic CLI tool
Detects GPU (NVIDIA/AMD/Intel), display server (Wayland/X11), desktop
environment, and VM status. Computes optimal configuration based on a
decision matrix and writes it to the graphics settings DB.

Usage: qbz --autoconfig-graphics

Part of #127.
2026-03-01 12:37:16 -06:00
vicrodh 58ad252798 feat: add GSK_RENDERER control for GTK4 rendering backend
Add gsk_renderer field to graphics settings DB with UI dropdown
(Auto/GL/NGL/Vulkan/Cairo). Value is read at startup and set as
GSK_RENDERER env var. Env var override takes precedence. Also
included in --reset-graphics and reset now restores hw_accel to true.

Part of #127.
2026-03-01 12:30:41 -06:00
vicrodh 82374ffde6 feat: add AMD and Intel GPU detection
Add is_amd_gpu() and is_intel_gpu() detection functions alongside
existing is_nvidia_gpu(). Update GraphicsStartupStatus to expose
has_amd and has_intel to frontend. Log detected GPUs at startup.

Part of #127.
2026-03-01 11:51:37 -06:00
vicrodh 1e98fa631e fix: wire hardware_acceleration DB value to startup logic
The hardware_acceleration toggle in settings was dead code — stored in
DB but ignored at startup (main.rs only checked QBZ_HARDWARE_ACCEL env
var). Now the DB value is read as the default, with env var override.

Fixes part of #127.
2026-03-01 11:49:51 -06:00
vicrodh 8e104a3f3e fix(audio): replace deprecated CPAL name() usage with description()
cx
2026-03-01 10:44:54 -06:00
vicrodh 4a97ff5588 fix(security): remove deterministic fallback inputs from credential key derivation
cx
2026-03-01 09:51:09 -06:00
vicrodh b57c7e38dc fix(security): remove unused tauri api user_id accessor
cx
2026-03-01 09:50:06 -06:00
vicrodh af332a5433 fix(security): remove hardcoded key material from credential encryption
cx
2026-03-01 09:24:47 -06:00
vicrodh 133defbafa fix(security): redact sensitive identifiers and secrets from backend logs
cx
2026-03-01 09:24:42 -06:00
vicrodh 87fd58b5ec fix(shutdown): avoid manual secondary window teardown on app close
cx
2026-03-01 09:13:40 -06:00
vicrodh 2095e5fce3 fix: add FavQ and TopQ context types to playback context
The ContextType enum and v2_set_playback_context match were missing
fav_q and top_q variants, causing an "Invalid context type" error that
blocked all playback from FavQ and TopQ views. Also wrap
setPlaybackContext calls in try/catch so context errors don't prevent
track playback.

Fixes #140
2026-03-01 08:58:45 -06:00
vicrodh ecbbcbbf98 fix: prevent double-close of WebKit windows causing heap corruption on exit
The "free(): corrupted unsorted chunks" crash was caused by secondary
windows (miniplayer) being closed twice during shutdown:

1. CloseRequested handler closes secondary windows before main closes
2. RunEvent::Exit handler tried to close them again

Calling close() on a window already mid-teardown causes WebKit's
EGL/GPU thread to hit a double-free during TLS cleanup, corrupting
the heap. This was visible even without audio playing.

Fix: use an AtomicBool flag (WINDOWS_CLOSED_BY_USER) set in
CloseRequested, checked in RunEvent::Exit. Secondary windows are
only closed in Exit if CloseRequested didn't already handle them
(e.g., SIGTERM from tauri dev hot reload).
2026-02-28 18:04:49 -06:00
vicrodh 421f993f82 fix: clamp window size to screen resolution and fix physical/logical pixel mismatch
Two fixes for issue #139 (window opens larger than screen):

1. Screen resolution clamping at startup: detect monitor size via
   xdpyinfo/xrandr and clamp saved window dimensions to 95% of screen.
   Prevents windows from opening larger than the display even if the DB
   has valid-but-too-large values.

2. Physical-to-logical pixel conversion in resize handler: the Resized
   event gives physical pixels but inner_size() expects logical pixels.
   With scale factor > 1.0, the window would grow each restart because
   physical values were saved and restored as logical. Now divides by
   scale_factor before persisting.

Closes #139
2026-02-28 17:56:42 -06:00
vicrodh 56b0e562a1 fix: check hardware rate compatibility on cached audio before playing
The smart quality downgrade was only in the network fetch path, but
tracks served from cache (memory L1, disk L2, offline) bypassed it
entirely. Now all cache paths probe the FLAC header for sample rate
and skip the cache if the hardware doesn't support it, falling through
to the network path which re-requests at Hi-Res quality.

Also applies quality downgrade to prefetch so upcoming tracks are
fetched at compatible quality instead of caching incompatible data.
2026-02-28 07:48:03 -06:00
vicrodh 7086110569 feat: smart quality downgrade for unsupported sample rates
When ALSA backend detects hardware doesn't support a track's sample rate
(e.g. 176400Hz on a DAC that supports up to 192000Hz but not 176.4kHz),
automatically re-request the track from Qobuz at Hi-Res quality instead
of Ultra Hi-Res. This avoids resampling and maintains bit-perfect playback
by getting a version at a rate the hardware natively supports.

Adds device_supports_sample_rate() and get_device_supported_rates()
public API to qbz-audio for hardware capability queries via /proc/asound.
2026-02-28 07:48:03 -06:00
vicrodh aff45f98f0 fix: close secondary windows before main to allow app exit, hide miniplayer on tray
Previous commit removed the miniplayer close from CloseRequested,
but that kept the app alive because Tauri won't exit while windows
remain open. Now closes secondary windows with close() (not
destroy()) in CloseRequested before the main window closes.
Also hides the miniplayer when close-to-tray activates.
2026-02-28 07:48:03 -06:00
vicrodh b1e4f8db94 fix: prevent WebKit crash on close by eliminating double-destroy of miniplayer
The miniplayer window was being destroyed twice during shutdown:
once in CloseRequested and again in RunEvent::Exit. This caused
WebKit's TLS destructors to collide during process teardown,
resulting in SIGABRT in WebKitWebProcess.

Changes:
- Remove miniplayer destroy from CloseRequested (was premature)
- Guard global on_window_event to only handle main window
- In RunEvent::Exit, close all secondary windows (miniplayer, oauth)
  with close() instead of destroy() for graceful WebKit cleanup
- Add 100ms delay after closing secondary windows to let WebKit
  tear down EGL/GPU resources before process exit
2026-02-28 07:48:03 -06:00
vicrodh 21fc1dfea3 fix: validate window size on load to prevent GDK crash from corrupt DB values
Extends PR #136 (save-time validation) with load-time validation.
If the DB contains corrupt sizes (e.g. 9084748x62267212), get_settings()
now returns safe defaults instead of passing garbage to GDK/Cairo.
Also extracts validation into a shared helper and adds NaN/Inf checks.
2026-02-28 07:48:03 -06:00
vicrodh 199f19a426 fix: read hardware audio status from V2 player instead of legacy
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.
2026-02-28 07:48:03 -06:00