Commit Graph
100 Commits
Author SHA1 Message Date
vicrodh ff15efde39 chore(i18n): add checker for t shadowing in svelte files
cx
2026-02-09 02:15:24 -06:00
vicrodh 3baa167d54 fix(i18n): avoid callback shadowing in local library view
cx
2026-02-09 02:13:10 -06:00
vicrodh b08dc17c0d fix(plex): hydrate track list quality without blocking UI
cx
2026-02-09 01:58:45 -06:00
vicrodh bdde90fc0d feat(plex): persist hydrated quality metadata in cache
cx
2026-02-09 01:51:30 -06:00
vicrodh bf99a19eb3 fix(plex): hydrate track quality and show plex source indicator
cx
2026-02-09 01:47:24 -06:00
vicrodh 228563454b feat(plex): checkpoint plex lan integration and quality sync
cx
2026-02-09 01:28:11 -06:00
vicrodh d2531ea700 refactor(ui): move gapless toggle from player bar to settings
Remove gapless button from NowPlayingBar and place it in
SettingsView under Playback section. The toggle is now sensitive to
blocking settings: auto-disables when ALSA Direct backend or
streaming-only mode is activated. Gapless itself never blocks other
settings. Added inline experimental label and descriptive tooltips
with proper i18n for all 4 locales.
2026-02-08 10:18:52 -06:00
vicrodh 71bfb8dc17 feat(ui): add gapless playback toggle button to player bar
Add a toggleable gapless button next to the repeat button in the
NowPlayingBar. The setting persists in audio_settings.db and controls
whether the audio thread pre-queues the next track for gapless
transitions. Includes i18n keys for all 4 locales.
2026-02-08 09:45:13 -06:00
vicrodh a21f7c7a93 feat(audio): implement gapless playback for cached tracks
Backend: Add PlayNext command to audio thread that appends decoded
sources to the existing Rodio Sink for seamless transitions. The audio
thread detects when ~5s remain and signals gapless_ready via SharedState.
Position-based transition detection updates track metadata when the
queued source begins playing.

Frontend: playerStore detects gapless_ready flag, invokes
play_next_gapless (cache-only lookup), and handles transitions by
advancing the queue without stop/play cycle. playbackService gains
gaplessTransition option to skip stop_playback when backend already
transitioned.

Gapless is only eligible when: same sample rate/channels, cached data,
Rodio backend (not ALSA Direct), not streaming, not a user skip.
Falls back to normal stop-play flow when ineligible.
2026-02-08 09:05:39 -06:00
vicrodh eaacc9e3a7 feat(audio): add real-time EBU R128 volume normalization (Phase 2)
Replace static ReplayGain-only normalization with real-time loudness
analysis that works with any audio source including Qobuz streams.

New components:
- DynamicAmplify: Source wrapper that reads gain from shared atomic
  with 50ms linear ramp to prevent clicks on gain changes
- AnalyzerTap: Source wrapper that batches samples and sends them
  to the analyzer thread via bounded channel (never blocks audio)
- LoudnessAnalyzer: Background thread computing EBU R128 integrated
  LUFS, first measurement at ~10s, refinement every ~5s
- LoudnessCache: SQLite persistence for computed LUFS values so
  replayed tracks get instant gain application

Pipeline when normalization ON:
  Decode -> Diagnostic -> AnalyzerTap -> DynamicAmplify -> Visualizer

Pipeline when normalization OFF (bit-perfect, unchanged):
  Decode -> Diagnostic -> Visualizer

Re-enable normalization toggle in NowPlayingBar UI.
2026-02-08 08:24:51 -06:00
vicrodh ac4cd8f4eb chore(ui): hide normalization icon until Phase 2
ReplayGain-only normalization is not useful for Qobuz streaming
(streams lack RG tags). Icon will be re-enabled once EBU R128
real-time analysis is implemented.
2026-02-07 23:26:47 -06:00
vicrodh 00d0ce7835 feat(ui): add normalization toggle to player bar
Adds 3-state normalization icon between fullscreen and volume controls.
Uses mask-image SVGs for theme-compatible coloring. Reduces song card
min-width by 72px to accommodate the new control.
2026-02-07 22:55:18 -06:00
vicrodh 717eb6fed2 feat(audio): expose normalization gain in playback events
Add normalization_gain field to SharedState and PlaybackEvent so the
frontend can display whether normalization is actively applied to the
current track. The gain factor is stored as AtomicU32 (f32 bits) and
emitted with each playback:state event.

cc
2026-02-07 22:47:14 -06:00
vicrodh 6edd2a3cda feat(audio): add volume normalization (Phase 1 — ReplayGain metadata)
Add ReplayGain-based volume normalization to the audio pipeline.
When enabled, extracts ReplayGain track gain/peak tags from audio
file metadata (Vorbis comments, ID3v2 TXXX) and applies a gain
factor via rodio's Amplify wrapper.

Pipeline order: Diagnostic (raw) -> Amplify (normalization) -> Visualizer
When normalization is OFF (default), no Amplify wrapper is inserted
and the pipeline remains 100% bit-perfect.

- New module: audio/loudness.rs (extraction + gain calculation)
- New settings: normalization_enabled, normalization_target_lufs
- New Tauri commands: set_audio_normalization_enabled/target
- Supports -14 LUFS (default), -18 LUFS, -23 LUFS targets
- Clipping prevention using peak metadata
- Gain preserved across resume/seek operations

cc
2026-02-07 21:32:32 -06:00
vicrodh a237be3a83 Differentiate DAC Passthrough tooltip from ALSA Direct bit-perfect
DAC badge tooltip now says "Active" instead of "Bit-perfect" since
PipeWire passthrough is best-effort, not guaranteed bit-perfect like
ALSA Direct hw:X,Y. Added a brief note in Settings when DAC Passthrough
is enabled clarifying the distinction. Also i18n'd the hardcoded
dacPassthroughTooltipOverride string in SettingsView.
2026-02-07 20:37:31 -06:00
vicrodh be56ecff90 i18n: replace hardcoded strings in AudioOutputBadges tooltip
Moved all hardcoded English/Spanish tooltip text to i18n keys
under audioBadges section in all 4 locale files.
Removed dead dacTooltip derived property (unused in template).
2026-02-07 18:11:49 -06:00
vicrodh af624d4642 feat(audio): add internal bit-depth diagnostic capture
Lock-free OR-mask analysis of f32 samples converted to i32,
bypassing PipeWire processing entirely. DiagnosticSource wraps
the audio source at decode level for both rodio and ALSA Direct
paths. Tauri commands: start_bitdepth_capture / stop_bitdepth_capture.

cc
2026-02-07 15:58:26 -06:00
vicrodh 3253e05263 Merge branch 'fixes/1.1.10/debug' into pre-release 2026-02-07 13:17:43 -06:00
vicrodh fdc8a96a7e chore: remove DEBUG-43 diagnostic logging
cc
2026-02-07 13:09:46 -06:00
vicrodh bcbe31d1f4 chore(vendor): fix unused import and mut warnings in rodio
cc
2026-02-07 12:55:23 -06:00
vicrodh 3990d7bdcf fix(updates): gate launch modals on session readiness
decideLaunchModals() was racing activate_user_session() because
setLoggedIn() triggers the $effect before the backend store opens.
Preferences defaulted to showWhatsNewOnLaunch=true, ignoring the
user's saved setting.

Add sessionReady flag set after activate_user_session completes.
The $effect now waits for session + home view before running.
Also reset all update state on logout for clean re-login cycle.

cc
2026-02-07 12:48:34 -06:00
vicrodh 220ac36b33 fix(css): remove remaining store accesses from $derived() blocks
+layout.svelte: $isLoading inside $derived() -> isReady() function
HomeView.svelte: $t() inside $derived.by() -> getGreetingText() function

These caused vite-plugin-svelte CSS extraction to fail, cascading
PostCSS errors to unrelated components during HMR.
2026-02-07 12:41:26 -06:00
vicrodh 1d284ac82a fix(css): remove remaining store accesses from $derived() blocks
+layout.svelte: $isLoading inside $derived() -> isReady() function
HomeView.svelte: $t() inside $derived.by() -> getGreetingText() function

These caused vite-plugin-svelte CSS extraction to fail, cascading
PostCSS errors to unrelated components during HMR.
2026-02-07 12:23:01 -06:00
vicrodh ecd006d176 fix(css): remove $t() from $derived() to fix PostCSS extraction
ImmersiveHeader splitTabs used $t() inside $derived(), causing
vite-plugin-svelte CSS extraction to receive raw script content
instead of CSS — cascading PostCSS errors to unrelated components.

ShortcutInput had the same pattern for displayShortcut.

Both now use the labelKey/function pattern instead.
2026-02-07 12:13:24 -06:00
vicrodh 28742fa19e fix(updates): ensure preferences are loaded from backend after login
initUpdatesStore() set its initialized flag before the async preference
fetch completed. If get_update_preferences failed (backend store not
yet ready), preferences stayed at defaults (both true) and were never
re-fetched. This caused:
- "Show What's New" toggle appearing enabled despite being disabled
- "Check for updates on launch" toggle not persisting
- Changelog modal reappearing on every restart

Changes:
- Split initialized flag into versionLoaded/prefsLoaded so preference
  loading retries until the backend store is ready
- Call refreshUpdatePreferences() in decideLaunchModals() to always
  get fresh data before making modal decisions
- Call refreshUpdatePreferences() in handleLoginSuccess() after
  session activation so SettingsView reflects saved values

cc
2026-02-07 11:58:32 -06:00
vicrodh 865e25e9b1 fix(listenbrainz): restore token and enabled state during session init
init_at() loaded credentials from the user-scoped SQLite cache but
never called restore_token() on the in-memory client. The client
remained empty, so get_status() always returned disconnected after
app restart. Also restore the enabled flag from persisted settings.

Fixes #54

cc
2026-02-07 11:56:34 -06:00
vicrodh e48bbb99df feat: add pkgrel input to AUR workflow
On release events pkgrel defaults to 1. On manual dispatch it can be
set to any value (default 1), allowing same-version rebuilds like
1.1.9-2 without editing the workflow.
2026-02-07 03:34:29 -06:00
vicrodh 1666672f0c fix: version unavailable in changelog button
initUpdatesStore used Promise.all for get_current_version and
get_update_preferences. Since preferences need the SQLite store
(only available after login), the failure killed both promises,
leaving currentVersion as empty string.

Split into independent calls so the version (a compile-time constant
that never needs a session) is always available regardless of
preference store state.
2026-02-07 03:33:52 -06:00
vicrodh b3607d1154 update AUR PKGBUILD version to 1.1.9 2026-02-07 03:01:56 -06:00
vicrodh befef6b1e3 cleanup: fix compiler warnings in playback commands
Remove unused mut on preferred_quality (limit_quality_for_device is
disabled). Add #[allow(dead_code)] to the preserved function.
2026-02-07 03:01:52 -06:00
vicrodh bb496ffaac fix: use bundled SQLite for snap builds
Remove LIBSQLITE3_SYS_USE_PKG_CONFIG and related env vars that forced
linking against system SQLite 3.37.2 on core22. The rusqlite bundled
feature compiles SQLite 3.38+ from source, which provides the
sqlite3_error_offset symbol needed by rusqlite 0.31.
2026-02-07 03:01:47 -06:00
vicrodh 5d617365c2 fix: show changelog button provides loading state and error feedback
The button previously failed silently when version was unavailable or
the GitHub API request failed. Now shows loading state while fetching
and a toast notification on failure.
2026-02-07 02:53:43 -06:00
vicrodh 29eb8b0d96 cleanup: remove DEBUG-43 console logging
Remove all [DEBUG-43] console.warn/error entries added during blank
album investigation. Keep essential error logging without the prefix.
2026-02-07 02:53:38 -06:00
vicrodh 12faa5837c fix: rename t variable in $derived() blocks to prevent PostCSS errors
The Svelte 5 CSS extraction breaks when t is used as a callback
parameter inside $derived() or $derived.by() blocks. Renamed to
track, item, or lt in PlaylistDetailView, FavoritesView,
PlaylistSuggestions, and PlaylistTagFilter.
2026-02-07 02:53:33 -06:00
vicrodh 5e3e3c252a update snapcraft and flatpak metadata for 1.1.9 2026-02-07 01:58:03 -06:00
vicrodh 3f18378c13 bump version to 1.1.9 2026-02-07 01:52:38 -06:00
vicrodh 09774c151f add DE and FR translations for playlist import modal 2026-02-06 23:39:04 -06:00
vicrodh feb007945b playlist import: add name customization and folder selection
Split import into two-step flow: Fetch (preview) then Import.
After fetching, user can edit the playlist name and optionally
assign it to a folder before importing. Backend already supported
name_override — this just exposes it in the UI. Also i18n all
new strings and existing hardcoded modal text.
2026-02-06 23:38:08 -06:00
vicrodh 3776925a5f auto-resume playback after audio settings change
When the user changes any audio setting (output device, exclusive mode,
DAC passthrough, backend type, ALSA plugin), the stream is reinitialized.
Previously playback would die and the user had to manually skip
forward/backward to recover. Now playback automatically resumes at the
same position after reinit, since the backend already preserves position
and audio data across ReinitDevice.
2026-02-06 22:20:23 -06:00
vicrodh 1e642758ad integrate home data cache for instant back-navigation
On mount, check if a valid cache exists (< 5 min, same genre filter).
If valid, restore all section data instantly and scroll position,
skipping all API calls. Cache is saved automatically when all
sections finish loading. Invalidated on genre filter change or
home settings change.
2026-02-06 22:08:10 -06:00
vicrodh cba9b5a3fa remove full-page overlay, add progressive skeleton rendering
Replace the blocking overlay system with per-section skeleton
placeholders that appear immediately and swap to real content
as each section loads independently. Download status checks are
now fire-and-forget (no longer block section display). Remove
all DEBUG-43 console warnings. Remove unused sidebarExpanded prop.
2026-02-06 22:06:19 -06:00
vicrodh 08dc86b987 add homeDataCache store for instant Home navigation
Module-level in-memory cache that stores all 11 Home sections'
resolved data with TTL (5 min) and genre filter snapshot validation.
Follows the same pattern as searchState.ts.
2026-02-06 21:20:06 -06:00
vicrodh f2d8408268 fix: preserve playback state across audio settings changes
ReinitDevice was resetting position to 0 and clearing audio data,
making it impossible to resume after changing audio settings.

Now uses pause_playback_timer() to capture real-time position and
keeps audio data intact. The existing Resume handler already
recreates the engine, re-decodes, and seeks to the saved position.

Removes unnecessary stop_playback calls from frontend that were
destroying the preserved state after backend/device changes.
2026-02-06 16:57:22 -06:00
vicrodh aef4285fd9 fix: defer visualizer, remote control, and last.fm to post-login
Visualizer FFT thread, remote control API server, and Last.fm session
restore were all initializing before user session activation, causing
errors ("No active session") and wasting resources.

Move all three to run after activate_user_session:
- Visualizer: add started guard to prevent double-start
- Remote control: sync_server now has per-user settings available
- Last.fm: restoreLastfmSession moved from bootstrapApp to handleLoginSuccess
2026-02-06 09:27:09 -06:00
vicrodh ff8c69f573 fix: eliminate login screen flash on auto-login
Move setLoggedIn() before the await activate_user_session() in
handleLoginSuccess. LoginView already activates the session for
auto-login, so the second call is idempotent. By setting the auth
state immediately, the template switches from LoginView to the app
without the ~475ms flash of the login form during the await.
2026-02-06 08:50:50 -06:00
vicrodh 5cd8769f84 debug: promote command handler logging to info level (#43)
The frontend JS console is inaccessible when the UI blanks, so all
diagnostic logging must go through the Rust backend (terminal).

Promote get_featured_albums, get_discover_index, get_artist_basic to
log::info with [DEBUG-43] prefix. Add OK/FAILED result logging to
get_album, get_track, get_featured_albums, get_artist_basic, and
get_discover_index command handlers.

This ensures the terminal shows the full sequence:
  reco_get_home_ml → featured_albums(x5) → discover_index → tracks → albums → artists
2026-02-06 08:29:42 -06:00
vicrodh 916b4c145a debug: add aggressive logging to home loading flow (#43)
Log every decision point in loadHome():
- totalVisibleSections count
- mlPromise invoke/resolve/reject with seed counts
- fetchDiscoverData invoke/result with container keys
- checkAllSectionsReady transition with hasContent/error state
- catch block entry (which blocks all content rendering)

Backend: reco_get_home_ml logs call, success with counts, and
explicit error when RecoState.db is None.
2026-02-06 08:25:21 -06:00
vicrodh e14a364484 fix: add API response status logging and 404 handling to client
Add [API] log lines with HTTP status to all client methods for
debugging blank views (#43). Handle 404 explicitly in get_track
(returns TrackUnavailable) and get_album (returns ApiResponse)
instead of attempting JSON deserialization of error responses.
2026-02-06 08:17:44 -06:00
vicrodh 2bff1290a3 fix: add catch handlers to all home section promise chains (#43)
Missing .catch() on 9 .then() chains in HomeView meant any rejected
promise (e.g. 404 from a deleted track) would prevent markSectionFinished()
from being called, leaving the loading overlay permanently visible.

Each catch now logs the error, clears the loading flag, and calls
markSectionFinished() so the overlay always dismisses.
2026-02-06 08:17:38 -06:00
vicrodh 1fce799674 fix: use gold hi-res badge with drop-shadow for legibility
Switch from hi-res-gray.svg back to the gold hi-res.svg. Add a
sub-pixel drop-shadow filter to reinforce thin text strokes against
the gold gradient, fixing chromatic anti-aliasing blur at 24px.
2026-02-06 06:26:01 -06:00
vicrodh 828b31671c fix: invalidate API cache on favorite mutations
add_favorite and remove_favorite now invalidate the corresponding
album/track/artist entry in the API cache after a successful API call.
This prevents stale JSON (missing the updated favorite status) from
being served on the next detail fetch. Added targeted invalidate_album,
invalidate_track, and invalidate_artist methods to ApiCache.
2026-02-06 06:13:14 -06:00
vicrodh 5b8e9920eb feat: cache genres with 7-day TTL
Genre lists from Qobuz are near-static, so caching them avoids
unnecessary API calls. Added cached_genres table with GENRE_TTL_SECS
(7 days), get/set methods, and wired cache into get_genres() command.
Also updated cleanup_expired and clear_all to include the new table.
2026-02-06 06:11:54 -06:00
vicrodh a4eb35002c refactor: centralize API headers into api_headers/authenticated_headers methods
Replace 30+ manual .header("X-App-Id")/("X-User-Auth-Token") calls with
two helper methods:
- api_headers(): always sends X-App-Id, optionally X-User-Auth-Token
- authenticated_headers(): requires auth, fails if not logged in

This fixes the root cause of #43 (get_album/get_track missing auth token)
by making it impossible to forget headers. Also removes DEBUG-43 verbose
response body logging from client.rs since the root cause is resolved.
2026-02-06 05:41:41 -06:00
vicrodh c94df8787f fix: add user auth token to get_album and get_track API calls
These endpoints were missing the X-User-Auth-Token header, causing
Qobuz to return 404 for all album and track detail requests. This is
the root cause of issue #43: blank album pages, "Unknown Artist" and
"0:00" in Recently Played / Continue Listening.

List endpoints (get_featured_albums) and playlist endpoints worked
because they either don't need auth or already included the token.

Closes #43
2026-02-06 05:17:02 -06:00
vicrodh 25dda16191 add defensive empty tracks check in AlbumDetailView
Show a user-friendly i18n message with back button when an album loads
without tracks, instead of displaying a blank track list. Uses
album.loadError key in both en.json and es.json.
2026-02-06 03:18:37 -06:00
vicrodh 1dc61b50c5 add DEBUG-43 diagnostic logging to frontend views
Add console.warn logging with [DEBUG-43] prefix to:
- handleAlbumClick: album ID, API response, converted data, tracks count
- AlbumDetailView onMount: album state and track availability
- HomeView fetchFeaturedAlbumsSingle: genre ID and result count

Uses console.warn for better WebKitGTK log visibility.
2026-02-06 03:17:13 -06:00
vicrodh a75f957cc9 add DEBUG-43 logging to album/track detail fetch pipeline
Add info-level logging with [DEBUG-43] prefix to:
- get_album/get_track commands: cache hit/miss/error, API errors
- API client get_album/get_track: request URL, response status, response
  body preview (first 500 chars), parse/deserialize errors

This traces the complete detail fetch path to diagnose why album/track
detail views fail for specific users while list endpoints work fine.
2026-02-06 03:16:18 -06:00
vicrodh 71bbc42bcf fix: validate genre filter to prevent empty home sections
Add validateAndCleanStoredGenreIds() to detect and remove stale genre IDs
from localStorage that do not exist in the loaded genre list. This prevents
the Qobuz API from returning empty results when localStorage contains
outdated genre IDs from previous sessions.

The validation runs after loading genres from both cache and API paths.
2026-02-06 03:14:05 -06:00
vicrodh b38bac7833 fix PostCSS crash: rename t variable inside $derived()
PlaylistDetailView used t as a callback variable inside $derived(),
which shadows the i18n t store and breaks Svelte CSS extraction
globally. Renamed to track.
2026-02-06 00:44:41 -06:00
vicrodh b6d2e10471 persist last user_id for session restore across app restarts
Saves the active user_id to a flat-path file on activate_user_session
and clears it on deactivate_user_session (explicit logout). On startup,
if saved credentials and a last_user_id both exist, the per-user session
is restored before loading ToS acceptance or attempting auto-login.

This fixes the chicken-and-egg problem where ToS acceptance lived in the
per-user DB but was needed before login to allow auto-login.
2026-02-06 00:37:52 -06:00
vicrodh 03736ef8f2 exclude qobuz_download tracks from library stats when toggle is off
get_stats() now respects the show_in_library setting so offline cached
tracks don't inflate the Local Library counter when the user has chosen
not to show them there.
2026-02-06 00:30:24 -06:00
vicrodh 88fe564802 move Fetch Artist Images into Offline Playback section
The "Library" section had a single lonely setting. Moved it into the
Offline Playback section and removed the now-empty Library section
along with its nav entry.
2026-02-06 00:28:43 -06:00
vicrodh 435e7760ad restore show-in-library toggle, rename section to Offline Playback
The toggle for showing offline cached tracks in the Local Library view
was removed from the UI but the backend logic remained. Re-added it to
the Offline Playback settings section. Also renamed the section from
"Offline Library" to "Offline Playback" in both EN and ES locales.
2026-02-06 00:27:43 -06:00
vicrodh 6ef50f7dc2 fix offline cache_dir not updating to user-scoped path
OfflineCacheState.cache_dir was set during new_empty() to the flat path
(~/.cache/qbz/audio/) and never updated when init_at() opened the DB at
the user-scoped path. This caused track files and artwork to be
read/written at the wrong location. Wrapped cache_dir in Arc<RwLock<>>
and update it during init_at().
2026-02-06 00:07:14 -06:00
vicrodh 9503ad9d49 defer per-user store init to post-login, reduce pre-login console noise
Moved initOfflineCacheStates, initPlaybackPreferences, initBlacklistStore
from onMount (before login) to handleLoginSuccess (after session active).
Downgraded pre-login "No active session" errors to debug level for
qobuzLegalStore, TitleBar tray settings, and offlineStore.
2026-02-05 23:53:28 -06:00
vicrodh 2dfb014a1e fix tokio panic: use async lock in init_at/teardown for tokio-mutex modules
blocking_lock() panics when called from within the tokio async runtime.
Changed init_at() and teardown() to async fn with .lock().await for all
8 modules using tokio::sync::Mutex (library, reco, api_cache,
artist_vectors, musicbrainz, listenbrainz, offline_cache, lyrics).
Updated activate/deactivate_user_session to .await these calls.
2026-02-05 23:47:48 -06:00
vicrodh c237ccee50 replace localStorage with per-user scoped storage in stores and views
Swap localStorage.getItem/setItem/removeItem for getUserItem/setUserItem/
removeUserItem from userStorage.ts across all stores, services, and view
components that use qbz- prefixed keys.

Global keys (theme, zoom-level, locale) remain as direct localStorage
since they're read before login during bootstrap.
2026-02-05 23:30:45 -06:00
vicrodh 8b3047b8fc add frontend per-user session lifecycle
- userStorage.ts: per-user localStorage scoping utility with migration
- authStore: add userId to UserInfo interface
- LoginView: extract user_id from login/auto_login responses
- +page.svelte: call activate_user_session after login,
  deactivate_user_session before logout, set up per-user localStorage
2026-02-05 23:22:43 -06:00
vicrodh b936490969 add user_id to LoginResponse and activate/deactivate session commands
LoginResponse now includes user_id from the Qobuz API session.

activate_user_session: called after login with user_id, runs one-time
flat-to-user migration, then initializes all 22+ per-user stores at
~/.local/share/qbz/users/{uid}/ and ~/.cache/qbz/users/{uid}/.
Also runs deferred subscription purge check.

deactivate_user_session: called before logout, tears down all per-user
stores to close database connections and clears the active user.
2026-02-05 23:19:23 -06:00
vicrodh 5a3399c677 switch to two-phase startup: empty per-user states until login
Phase 1 (device-level): Read audio/tray settings from flat path once
for player and tray init. Initialize cast, DLNA, API server.

Phase 2 (per-user): All 22 per-user states init as new_empty().
They get populated after login via activate_user_session.

Subscription purge check deferred to activate_user_session.
2026-02-05 23:15:14 -06:00
vicrodh dbb5d998de update all command handlers for Option-wrapped per-user state
Modify callers in commands/, cast/, library/, and lib.rs to unwrap
Option<Store> with appropriate error messages. Fix drop(db) to
drop(guard__) for correct mutex release.
2026-02-05 23:11:17 -06:00
vicrodh aab3e67641 add per-user isolation support to all remaining modules
Add new_at() constructors, Option<Store> wrappers, new_empty()/init_at()/
teardown() methods, and update all commands to unwrap Option for:
- config: audio_settings, download_settings, favorites_cache,
  favorites_preferences, legal_settings, playback_preferences,
  remote_control_settings, subscription_state, tray_settings
- data: api_cache, artist_blacklist, artist_vectors, library,
  listenbrainz, lyrics, musicbrainz, offline, offline_cache,
  radio_engine, reco_store, updates
2026-02-05 23:11:07 -06:00
vicrodh 48dac0ec3a add per-user isolation support to session_store
- Extract DB init into open_at() shared helper
- Add new_at(base_dir) constructor
- Wrap SessionStoreState inner store in Option<SessionStore>
- Add new_empty(), init_at(), teardown() lifecycle methods
- Update all tauri commands to unwrap Option with user-friendly error
2026-02-05 22:41:39 -06:00
vicrodh 079be6333e add migration module for flat-to-user data layout
One-time migration moves all existing DB files and cache directories
from the flat layout into users/{uid}/ subdirectories. The first user
to log in after the update inherits all existing data. A .migrated
marker file prevents re-running.

Handles WAL/SHM journal files, cross-device moves via copy+delete
fallback, and recursive directory copying.
2026-02-05 22:40:02 -06:00
vicrodh 441acafba5 add UserDataPaths module for per-user data isolation
Central path provider that holds the current user_id behind RwLock.
Provides user-scoped data and cache directory paths:
- ~/.local/share/qbz/users/{uid}/
- ~/.cache/qbz/users/{uid}/

Registered as Tauri managed state. No behavior change yet -
user paths are not used by any module until activate_user_session
is implemented.
2026-02-05 22:38:39 -06:00
vicrodh b988eb7896 chore(snap): disable arm64 build for now
cx
2026-02-05 21:17:55 -06:00
vicrodh 87e0967494 fix(snap): bootstrap rust toolchain
cx
2026-02-05 19:53:49 -06:00
vicrodh 99dc777d27 fix(snap): prefer rustup toolchain cargo
cx
2026-02-05 19:18:09 -06:00
vicrodh bcceaf1311 fix(snap): move link env to build step
cx
2026-02-05 18:41:09 -06:00
vicrodh 6678a8317f fix(snap): use system sqlite for arm64 link
cx
2026-02-05 18:07:46 -06:00
vicrodh 0639027fbb chore: remove old ROADMAP.md (moved to docs) 2026-02-05 17:56:39 -06:00
vicrodh 4829236c29 fix(readme): change all badges to flat-square style 2026-02-05 17:47:00 -06:00
vicrodh 2cac902d81 fix(readme): replace Snapcraft badge with shields.io inline badge
Remove the large standalone Snapcraft badge and add a shields.io
badge matching the style of the other badges in the header row.
2026-02-05 17:45:08 -06:00
vicrodh a8004f1a92 fix(immersive): increase menu opacity and auto-close on mouse leave
Bump window menu background from 0.7 to 0.8. Add 2-second auto-close
timer when mouse leaves the menu area; re-entering cancels the timer.
2026-02-05 17:40:07 -06:00
vicrodh fe10c0514b fix(immersive): adjust window menu opacity and alignment
Increase background opacity from 0.5 to 0.7 and open menu to the
right (left-aligned) instead of right-aligned.
2026-02-05 17:24:26 -06:00
vicrodh 95d5eba026 feat(immersive): add window controls dropdown to player bar
Replace the non-functional '...' button with a dropdown menu
containing Fullscreen, Maximize/Restore, Minimize, and Exit
Immersive options. Menu uses the same glassmorphism style as the
player bar for visual consistency.
2026-02-05 17:22:05 -06:00
vicrodh 1256a15a5a feat(i18n): add window control translation keys for immersive player
Add fullScreen, exitFullScreen, maximize, restore, minimize, and
exitImmersive keys to the player section in all 4 locale files.
2026-02-05 17:22:00 -06:00
vicrodh 59bcbe9dd7 feat(immersive): persist and restore view preference (#51)
On open, restore the preferred view from localStorage. When set to
'remember', save the current view on every view/tab switch via header
or keyboard. When set to a specific view, always open to that view.
2026-02-05 17:05:46 -06:00
vicrodh 27763582a0 feat(settings): add immersive default view dropdown (#51)
Add dropdown in Settings > Appearance to choose which view immersive
mode opens with. Options: Remember last used (default), 6 focus views,
and 4 split-mode combinations. Persisted via localStorage.
2026-02-05 17:05:42 -06:00
vicrodh 62c0810a67 feat(i18n): add immersive default view translation keys
Add immersiveDefaultView label and immersiveViews object with all 11
view options to en.json, es.json, fr.json, and de.json under
settings.appearance.
2026-02-05 17:05:37 -06:00
vicrodh 7718f10b37 feat(visualizer): update TappedSource to work with f32 samples
Change Source<Item = i16> to Source<Item = f32> throughout.
Remove i16-to-f32 normalization since f32 samples are already in
[-1.0, 1.0] range. Update tests to use f32 sample data.
2026-02-05 16:20:03 -06:00
vicrodh a923798bae feat(audio): add write_f32() and migrate PlaybackEngine to f32 pipeline
PlaybackEngine::append() now accepts Source<Item = f32>.
ALSA Direct thread uses f32 buffer and calls write_f32().

New write_f32() method in AlsaDirectStream converts f32 samples to
hardware format with full 24-bit precision:
- S24_3LE: f32 -> 24-bit packed 3 bytes (SMSL/Topping DACs)
- S32LE: f32 -> i32 full range
- S24LE: f32 -> 24-bit in i32 container
- S16LE: f32 -> i16
- FloatLE: direct write

Old write(&[i16]) kept for safety during migration.
2026-02-05 16:19:27 -06:00
vicrodh 2c276154b8 feat(streaming): change IncrementalStreamingSource output from i16 to f32
Update sample queue, SampleBuffer, and Iterator Item type to f32.
Streaming playback from Qobuz now preserves 24-bit audio data.
2026-02-05 16:17:49 -06:00
vicrodh 1219493dff feat(player): change player module sample type from i16 to f32
Update AudioSpecs, decode_with_symphonia(), decode_with_fallback(),
wrap_source closure, and all Source boxing casts to use f32 samples.
This ensures 24-bit audio data flows through the player without
truncation to 16-bit.
2026-02-05 16:17:27 -06:00
vicrodh ba828866ef feat(rodio): change SymphoniaDecoder output from i16 to f32
Change SampleBuffer<i16> to SampleBuffer<f32> in the vendored rodio
decoder. This preserves 24-bit audio data (f32 has 24 bits of
significand) instead of truncating to 16-bit at decode time.

Affects: symphonia.rs (SampleBuffer, Iterator::Item)
         mod.rs (Decoder, LoopedDecoder, DecoderImpl Iterator::Item)
2026-02-05 16:16:34 -06:00
vicrodh c0508c8050 chore: ignore snapcraft remote-build logs
cx
2026-02-05 11:59:51 -06:00
vicrodh cbfb91ad2f fix: show favorite state for popular tracks on artist page
Subscribe to favoritesStore in ArtistDetailView to display filled
heart icon when a track is already favorited. The button now toggles
(add/remove) instead of only adding, with proper loading state.
2026-02-05 11:25:12 -06:00
vicrodh a70a33577c fix(player): resume playback from queue after stop (#46)
When user presses STOP then PLAY, playback now resumes the current
queue track instead of doing nothing. Added onResumeFromStop callback
in playerStore that queries the backend queue state and re-plays the
current track. The audio cache ensures instant playback within the
same session.
2026-02-05 11:11:48 -06:00
vicrodh a2cd01e449 fix(album): add defensive fallback for blank album page (#43)
When activeView is 'album' but selectedAlbum is null, show an error
message with a back button instead of a blank page. Also add detailed
console logging in handleAlbumClick to help diagnose the root cause
for users who can reproduce.
2026-02-05 08:47:31 -06:00
vicrodh af0e235bb2 fix(immersive): close lyrics sidebar when entering immersive (#47)
Lyrics sidebar was staying open behind the immersive player, causing
duplicate CPU usage for synced lyrics rendering. Now hideLyricsSidebar
is called alongside closeAllMenus when opening fullscreen or focus mode.
2026-02-05 08:37:52 -06:00