Commit Graph
100 Commits
Author SHA1 Message Date
vicrodh e7f06fcd2f feat(offline): implement Last.fm scrobble queue for offline mode
Research findings:
- Last.fm API supports batch scrobbling (up to 50 tracks)
- Timestamps can be backdated up to 14 days

Implementation:
- Add scrobble_queue table to offline database
- Add queue_scrobble, get_queued_scrobbles, mark_scrobbles_sent commands
- Queue scrobbles when offline instead of skipping
- Flush queue automatically when transitioning to online
- Skip scrobbles older than 14 days (Last.fm limit)
- Cleanup sent scrobbles after 7 days
2026-01-15 23:24:24 -06:00
vicrodh b4af6f6e9f feat(offline): add NowPlayingBar offline indicators
- Add offline indicator icon in right section when offline
- Disable lyrics button with tooltip when offline
- Skip Last.fm scrobbling when in offline mode
- Use offline-small.svg for compact indicator
2026-01-15 23:11:33 -06:00
vicrodh 4891b9bcbc feat(offline): disable external services when offline
- DownloadButton: show CloudOff icon and disable when offline
- LyricsStore: skip fetching and show "unavailable offline" message
- LocalLibraryView: skip artist image fetching from Qobuz/Discogs
- PlaylistImportModal: disable import with warning when offline
2026-01-15 23:07:16 -06:00
vicrodh 6e0d7486b0 feat(offline): add offline mode link to login screen
- Add "Start in offline mode" link below login form
- Enable offline mode without authentication
- Navigate directly to local library when starting offline
- Add i18n strings for offline start link (en/es)
2026-01-15 22:59:30 -06:00
vicrodh 6bcb1fc7a6 feat(offline): add playlist filtering and local content badges
Frontend:
- Filter playlists by local content when offline
- Respect showPartialPlaylists setting for filtering
- Add local content badges (green=all, yellow=partial) in grid/list views
- Subscribe to offline state in PlaylistManagerView
- Add pending playlist functions to offlineStore

Assets:
- Add offline-small.svg icon for compact indicators

cc
2026-01-15 22:56:32 -06:00
vicrodh dd5641e36b feat(offline): add pending playlist sync queue
Backend:
- Add PendingPlaylist struct for offline-created playlists
- Create pending_playlist_sync table in SQLite
- Add methods: create_pending_playlist, get_pending_playlists,
  mark_playlist_synced, delete_pending_playlist, get_pending_playlist_count
- Register Tauri commands for pending playlist management

Assets:
- Add offline.svg icon for offline mode indicator

cc
2026-01-15 22:52:02 -06:00
vicrodh 78d35785ed feat(offline): add offline mode settings section
- Add Offline Mode section to SettingsView
- Display current offline status with reason
- Toggle for manual offline mode (Enable Offline Mode)
- Toggle for showing partial playlists in offline mode
- Subscribe to offlineStore for real-time status updates
- Add status indicator styling (green=online, yellow=offline)

cc
2026-01-15 22:43:18 -06:00
vicrodh b7c1af6123 feat(offline): add view access restrictions for offline mode
- Create OfflinePlaceholder component with reason-specific messaging
- Add i18n strings for offline mode (en/es)
- Subscribe to offlineStore in +page.svelte
- Show OfflinePlaceholder for home, search, favorites views when offline
- Provide quick navigation to local library from placeholder

cc
2026-01-15 22:19:17 -06:00
vicrodh 1b9fff3746 feat(offline): add frontend offline state store
- Create offlineStore.ts with status and settings management
- Add 30-second polling for offline status checks
- Listen for backend offline-status-changed events
- Integrate with app bootstrap for initialization and cleanup
- Export getters: isOffline, getOfflineReason, getStatus, getSettings
- Export actions: setManualOffline, setShowPartialPlaylists, refreshStatus

cc
2026-01-15 22:12:59 -06:00
vicrodh 02240f41ac feat(offline): add playlist local content detection
- Add LocalContentStatus enum (unknown, no, some_local, all_local)
- Add has_local_content column to playlist_settings with migration
- Implement local track matching by Qobuz ID and by metadata (title+artist+album)
- Add commands: playlist_analyze_local_content, playlist_get_local_content_status,
  playlist_track_is_local, playlist_get_local_track_id, playlist_get_offline_available
- Add database functions for local content filtering and status updates

cc
2026-01-15 22:11:08 -06:00
vicrodh 21354f9b64 feat(offline): add offline mode detection backend
- Create offline module with OfflineReason enum and OfflineStatus struct
- Add OfflineSettings for manual mode and partial playlist preferences
- Implement network connectivity check via HEAD request to qobuz.com
- Add SQLite persistence for offline settings
- Register Tauri commands: get_offline_status, get_offline_settings,
  set_manual_offline, set_show_partial_playlists
- Add event emission for offline status changes

cc
2026-01-15 22:06:41 -06:00
vicrodh 99aba9a76a feat(artist): add search navigation with prev/next buttons
- Add navigation to search results with smooth scrolling
- Show result counter (X/Y) with prev/next chevron buttons
- Support keyboard navigation (Enter, Shift+Enter, Escape)
- Add searchId prop to AlbumCard for DOM targeting
- Style search toggle button without background
- Remove focus outline from search input
2026-01-15 18:20:32 -06:00
vicrodh 98f1209e37 feat(artist): add page search and improve bio truncation
Page search:
- Add search button in sticky jump-nav bar
- Slide-in animation from right when opened
- Filter albums, EPs, live, compilations, tributes, others, playlists
- Show result count or "No results" message
- Press Escape to close

Bio improvements:
- Reduce truncation to 530 chars (was 800, now 2/3)
- Only show "Read more" if text actually needs truncation

Live detection - additional languages:
- German: Konzert, liveopname
- Japanese: ライブ (raibu)
- Korean: 라이브 (laibeu), 콘서트 (konseuteu)
- Dutch: liveopname
2026-01-15 18:06:01 -06:00
vicrodh 80579e29fa fix(artist): improve live and interview detection patterns
Live albums:
- Add "On Stage" pattern (Market Square Heroes On Stage Vol.1/2)
- Add multilingual support: en vivo, en directo (ES), ao vivo (PT),
  dal vivo (IT), en direct (FR)

Unofficial releases:
- Fix interview detection to include plural "interviews"
- Add "Remaining Memories: The Interviews" pattern
2026-01-15 17:54:58 -06:00
vicrodh 74483f2b10 feat(artist): add Tributes section and improve album categorization
Major improvements to album categorization logic:

Detection improvements:
- Broadcasts: detect plural forms, "Radio Broadcasts", "The Beast Radio"
- Live albums: detect "Alive", city+year patterns (Seattle 1989, Tokyo 1986)
- Podcasts: detect "Report Episode X", single-track 20+ min releases
- Singles: 1-4 tracks (classic 45rpm), explicit markers in title

New Tributes section:
- Albums by different artists now go to "Tributes & Covers"
- Separates tribute/cover albums from legitimate artist content
- Keeps Others clean for compilations, B-sides, unofficial releases

Categorization priority:
1. Different artist -> Tributes
2. Broadcasts/bootlegs/podcasts -> Others
3. Compilations (greatest hits, B-sides) -> Others
4. Live albums -> Live
5. Studio albums (7+ tracks, 25+ min, deluxe) -> Discography
6. EPs/Singles (1-4 tracks, <15 min) -> EPs & Singles
2026-01-15 17:25:16 -06:00
vicrodh ecf85bbd0b fix(artist): rewrite album categorization logic for accuracy
- Add artist ID comparison to filter albums from different artists
- Create separate detection for unofficial releases (broadcasts, bootlegs)
- Create separate detection for compilations (greatest hits, tributes)
- Make EP/Single detection more conservative (1-3 tracks or <15min)
- Add studio album detection to keep deluxe/remaster editions in Discography
- Prioritize categorization: different artist > unofficial > compilation > live > studio > EP
- Fix broadcasts incorrectly going to Live Albums (now go to Others)
- Fix deluxe box sets incorrectly going to Others
- Fix full-length albums with 8 tracks being classified as EPs
2026-01-15 16:59:17 -06:00
vicrodh f2c236b861 fix(artist): improve album categorization logic
- Live albums: detect broadcasts, tour dates, concert recordings
- Others: include FM broadcasts, bootlegs, compilations, tributes
- Others: detect soundtracks, various artists releases
- Filters: cover albums, demos, rehearsals, radio sessions
- Pattern matching: more comprehensive regex for edge cases

Fixes issue with Metallica FM Broadcasts and live albums not
being properly categorized.

cp
2026-01-15 16:45:51 -06:00
vicrodh 8a010800dc Merge feature/search-enhancement into main
Enhanced search view with unified results display, intelligent carousels,
and improved navigation. See branch commits for full details.

cp
2026-01-15 16:38:59 -06:00
vicrodh 0343ca2b1e fix(search): refine layout and tab navigation styling
- Most Popular: reduced to 176px width (4px less)
- Artists section: receives extra space
- Carousel buttons: cursor default when disabled (no not-allowed)
- Tab navigation: bottom border indicator (like artist view)
- Tab active state: accent color border, no background change
- Tab count badges: bg-tertiary background

cp
2026-01-15 15:54:49 -06:00
vicrodh b9310d8994 fix(search): fine-tune spacing in top section
- Reduced gap between Most Popular and Artists (18px, was 24px)
- Reduced gap between artist cards (15px, was 16px)

cp
2026-01-15 15:50:58 -06:00
vicrodh 3c44ecf742 fix(search): align most popular card to left
- Most popular wrapper: justify-content flex-start (was center)
- Card now aligns with artists carousel cards

cp
2026-01-15 15:33:58 -06:00
vicrodh 6a00cbea87 fix(search): adjust most popular container width
- Most Popular: fixed width 180px (was minmax 90px, 1fr)
- Artists: takes remaining space with 1fr
- Improves visual alignment between sections

cp
2026-01-15 15:27:28 -06:00
vicrodh f642f0532a fix(search): most popular section header alignment
- Most popular section-header: explicit flex properties
- Most popular h3: margin 0 instead of margin-bottom 0
- Ensures vertical alignment matches artists section

cp
2026-01-15 15:23:57 -06:00
vicrodh 83a55df7ef fix(search): align most popular header and improve view more styling
- Reduced most popular container width (90px min, was 140px)
- Artists section gets more space (4fr vs 3fr)
- Most popular h3: margin-bottom 0, section-header has 16px
- View more border: solid instead of dashed
- View more text: centered, bold, 14px (matches album title size)

cp
2026-01-15 15:22:21 -06:00
vicrodh 03d330e1d0 fix(search): align headers and redesign view more cards
- Most Popular: added section-header wrapper for alignment
- Most Popular card: centered with wrapper div
- View more cards: redesigned as cover art (160x160) with description
- View more text: shows remaining count (e.g. '20 more albums to discover')
- Removed background/border from card container, moved to cover button

cp
2026-01-15 15:16:24 -06:00
vicrodh 41939e295d fix(search): carousel buttons, alignment and view more injection
- Carousel buttons: transparent background, only hover has bg
- Most Popular card: centered in container
- View more cards: injected into carousel as items (not appended)
- Albums/Artists with view more merged into carousel data
- Pagination includes view more card in calculations

cp
2026-01-15 15:08:48 -06:00
vicrodh db49168623 feat(search): add carousel for artists and view more cards
- Albums: 30 results with view more card if total > 30
- Artists: 12 results with carousel navigation
- Artists carousel: same pagination logic as albums
- View more cards: 160x220px dashed border, navigate to tab
- Artists gap: reduced to 16px (same as albums)
- Separate page tracking for albums and artists

cp
2026-01-15 15:04:15 -06:00
vicrodh c466a0817c fix(search): carousel pagination and artist card layout
- Carousel: bind container, use visibleAlbums slice for pagination
- Artist cards: fixed 160x220px with circular 120x120 images
- Artist names: 2-line clamp with ellipsis for long names
- Grid spacing: 24px gap between artist cards
- Prevent image deformation with min-height and flex-shrink

cp
2026-01-15 14:57:01 -06:00
vicrodh 8a3e8546bd fix(search): single row carousel and homogenize artist cards
- Albums carousel: display flex (one row only)
- Backend: 20 albums (was 16)
- Artist cards: all 160x220px (most popular and grid)
- Carousel buttons work with multiple pages

cp
2026-01-15 14:51:44 -06:00
vicrodh b04cc8fb16 fix(search): improve carousel pagination and crown styling
- Crown: simple gold color (no complex animation)
- Albums carousel: dynamic page-based navigation
- Calculate albums per page based on container width
- Navigation buttons now paginate instead of scroll
- Reset to page 0 on new search results
- Remove carousel overflow/scrollbar

cp
2026-01-15 14:46:43 -06:00
vicrodh 919e72c0d2 fix(search): final adjustments for unified search view
- Artist cards: fixed spacing with 16px gap, 120x120 circular images
- Layout: Albums and Tracks now in separate full-width rows
- Carousel: Changed to single row (was 2 rows)
- Crown icon: Shimmer gradient effect (no glow/drop-shadow)
- Backend already at 16 albums

cp
2026-01-15 14:27:01 -06:00
vicrodh 922be5f2b5 fix(search): implement dynamic carousel with proper layout
- Add dynamic carousel column calculation based on container width
- Carousel calculates visible columns on mount and resize
- Scroll amount adjusts to show full pages (no partial cards)
- Fix padding-right to restore margin from sidebar (24px)
- Remove glow from Most Popular card
- Add shimmering animation to Crown icon (gold drop-shadow)
- Homologate all artist cards to same size (160x220px)
- Add play button overlay on track artwork (hover)
- Reduce album gap from 20px to 16px
- Fix overflow-x only on carousel wrapper (not entire page)
- Maintain 50/50 layout for albums/tracks sections

cp
2026-01-15 13:21:45 -06:00
vicrodh cd3016ed05 feat(search): add carousel navigation and improve Most Popular styling
- Add Crown icon to Most Popular header
- Homologate Most Popular card size with Artists section
- Add subtle glow effect to Most Popular card (box-shadow)
- Implement albums carousel with navigation buttons (< >)
- Carousel displays 2 rows of albums, scrollable horizontally
- Albums grid auto-adjusts columns based on viewport width
- Add carousel control buttons with hover effects
- Carousel buttons disable when at boundaries (canScrollLeft/canScrollRight)
- Remove overflow scrolling, replace with button navigation
- Align albums section height with tracks section (6 items baseline)
- Responsive carousel adjusts card size: 180px -> 160px -> 140px

cp
2026-01-15 13:01:30 -06:00
vicrodh 7b9320ac3a refactor(search): improve unified search layout and UX
- Fix Most Popular card height to match Artists section cards
- Add scrollable overflow to Artists grid for small windows
- Move Albums and Tracks to same row (50/50 split)
- Replace carousel with responsive grid for Albums section
- Grid auto-adjusts album count based on screen width
- Reduce tracks display to 6 items for better balance
- Add hover underline effect to View all links
- Improve responsive breakpoints for mobile/tablet
- Remove large artist card styles (unified sizing)
- Add custom scrollbar to Artists grid

cp
2026-01-15 12:51:08 -06:00
vicrodh aa0e44d533 feat(search): add unified search view with all results tab
- Add search_all command to Rust backend (parallel search execution)
- Create SearchAllResults type for unified search results
- Add 'all' tab as new default in search view
- Implement unified results layout:
  - Most Popular section (top artist or album)
  - Artists section (up to 5 artist cards)
  - Albums carousel (horizontal scroll, 10 albums)
  - Tracks section (top 8 tracks)
- Add View all links to navigate to individual tabs
- Update search state store to include allResults
- Maintain existing tab functionality (albums, tracks, artists)
- Add responsive grid layout for unified view

cp
2026-01-15 12:38:41 -06:00
vicrodh 437027790e fix(ui): improve Light theme contrast for quality badges and play buttons
- Quality badge in AlbumCard: inverted colors for better visibility
- Quality badge in NowPlayingBar: added Light theme specific styles
- Play button in TrackRow: changed color for better contrast
- Fixed Recently Played section badge height to prevent border clipping

cp
2026-01-15 12:15:27 -06:00
vicrodh afca54b683 fix: copy custom images to persistent storage
- Playlist artwork now copied to artwork cache directory
- Artist custom images now copied to artwork cache directory
- Prevents issues when source files are moved or deleted
- Uses MD5 hash for artist filenames to avoid special characters

cp
2026-01-15 11:55:32 -06:00
vicrodh 9de28b8480 fix: quality badge contrast in Light theme and artist image upload parameter
- Quality badge now has dark background with white text in Light theme
- Fixed parameter name in artist image upload (customImagePath)
- Improved visibility on both AlbumCard and QualityBadge components

cp
2026-01-15 11:48:09 -06:00
vicrodh 60180c179b fix(ui): improve contrast and theme consistency
- Fix Dropdown selected option contrast in Light and Warm themes
- Improve QualityBadge border contrast in Light theme (AlbumCard and NowPlayingBar)
- Add custom artist image upload button in LocalLibrary (visible only when settings panel is open)
- Position upload button at top-right of artist card, consistent with other edit buttons

cp
2026-01-15 11:37:16 -06:00
vicrodh 031cc3e081 fix(ui): improve queue toggle, theme sensitivity
- Queue button in NowPlayingBar now acts as toggle (open/close)
- Queue sidebar uses theme-aware background instead of glassmorphic effect
- Dropdown hover and selected states now use CSS variables for theme support
- Fixes contrast issues in Light and Warm themes

cp
2026-01-15 11:25:41 -06:00
vicrodh 80ad1d45e2 fix(cache): clear artist cache on language change
Artist biographies were being cached per locale but not refreshed
when user changed language settings. Now automatically clears artist
cache when language is changed to force refetch in new language.

cp
2026-01-15 10:53:49 -06:00
vicrodh dd1df5bfee feat(library): implement persistent artist images with Discogs fallback
- Add loadCachedArtistImages() to load from database
- Add fetchMissingArtistImages() with Qobuz + Discogs fallback
- Add discogs_search_artist command for artist lookups
- Artist images now persist between sessions
- Discogs used as fallback when Qobuz has no image

cp
2026-01-15 10:06:52 -06:00
vicrodh a5200d5d05 feat(cache): add locale support for artist cache
- Modify cached_artists table to include locale in primary key
- Update get_artist and set_artist methods to consider locale
- Add get_locale() method to QobuzClient for cache key generation
- Ensure artist descriptions respect language settings

cp
2026-01-15 10:02:25 -06:00
vicrodh d0a30c7175 fix(local-library): remove non-existent AddToPlaylistModal import
- Remove broken AddToPlaylistModal component import
- Use existing PlaylistModal infrastructure from parent component
- Pass onTrackAddToPlaylist callback from +page.svelte to LocalLibraryView
- Follow existing pattern used in AlbumDetailView and other views

cp
2026-01-15 09:43:40 -06:00
vicrodh 0b439bff14 fix(ui): use existing PlaylistModal for now playing add to playlist
- Remove duplicate AddToPlaylistModal component
- Reuse PlaylistModal component that TrackRow already uses
- Consolidate playlist management UI patterns

cp
2026-01-15 09:32:42 -06:00
vicrodh 42349f14dd fix(api): respect user locale for artist biography
- Add locale field to QobuzClient for API language preference
- Pass lang parameter to Qobuz artist detail endpoints
- Create set_api_locale command to update client locale
- Sync API locale with UI i18n settings automatically
- Render artist biography HTML tags properly using @html
- Fix syntax error in FavoritesView (missing comma)

cp
2026-01-15 08:57:13 -06:00
vicrodh 72693e184f feat: use proper quality badges in favorites view
Added maximum_bit_depth and maximum_sampling_rate fields to FavoriteAlbum interface.
Implemented getQualityLabel function to display proper quality info (e.g., 24bit/192kHz) instead of generic Hi-Res label.
Applied to both album and track views in Favorites.

cp
2026-01-15 08:50:09 -06:00
vicrodh e281932340 feat(artist): increase album and track limits
- Increase initial artist albums fetch from 500 to 1000
- Increase load more albums batch from 50 to 200
- Increase top tracks display from 5 to 20
- Prefer full biography content over summary
- Increase bio truncate threshold from 500 to 800 characters

cp
2026-01-15 08:25:03 -06:00
vicrodh bba12f2832 feat(ui): improve home settings layout and add playlist modal to now playing
- Move item limits inline with section toggles in home settings modal
- Remove separate limits section for cleaner, more compact layout
- Add add-to-playlist functionality to now playing bar Plus button
- Wire up AddToPlaylistModal to current playing track

cp
2026-01-15 08:22:16 -06:00
vicrodh c6b8ab686a Merge UX improvements
- Increased artist album limit from 100 to 500
- Added Others category for compilations/greatest hits
- Added configurable Home section limits in settings
- Added grouping toggle for LocalLibrary albums and tracks

cp
2026-01-15 08:02:43 -06:00
vicrodh b7e328d8dc feat(local-library): add grouping toggle for albums and tracks
- Add albumGroupingEnabled and trackGroupingEnabled states
- Add Off option to grouping dropdown menus
- Conditionally render group headers and alpha index based on grouping state
- Match UX behavior from Favorites view

cp
2026-01-15 08:02:29 -06:00
vicrodh bf4050a592 feat(ux): increase artist album limits and add Others section
- Increase artist detail album fetch from 100 to 500
- Increase bio truncation from 300 to 500 chars
- Add Others category for greatest hits/anthologies
- Add configurable limits for Home sections
- Update HomeSettingsModal with limits grid UI

cp
2026-01-15 08:00:16 -06:00
vicrodh dd9eb90343 fix(ui): prevent simultaneous opening of download and share menus
Ensure that opening the download menu closes the share menu and vice versa to avoid overlapping UI elements.

cc
2026-01-15 07:40:17 -06:00
vicrodh 9443708aad fix(ui): ensure album download state updates reactively in Home and Search views
Added downloadStatusTick counter to force Svelte 5 reactivity when albumDownloadStatuses Map changes.

cp
2026-01-15 07:28:20 -06:00
vicrodh a1df7095fb fix(downloads): ensure album download status is reactive in grid overlays
Add downloadStateVersion prop to AlbumCard component to make download
status reactive in all grid views. This fixes the issue where the
download menu submenu would not appear in Home, Search, and Artist
Detail views even when albums were fully downloaded.

cp
2026-01-15 01:00:55 -06:00
vicrodh f15316533f fix: album download menu not updating in grid views
- Force Map reactivity by re-assigning after .set()
- Add missing downloadStateVersion effect in SearchView
- Ensures download menu updates across all grid views

cp
2026-01-15 00:51:43 -06:00
vicrodh 6cc625c0f1 fix: reload download states in HomeView and ArtistDetailView when download state changes
cp
2026-01-15 00:45:25 -06:00
vicrodh 87f8980323 fix(ui): load album download status on grid view load
Load download status for all albums when they are first loaded
in grid views (Home, Search, Artist Detail, Favorites) so the
'Download Album' menu shows correct state immediately.

cp
2026-01-15 00:39:10 -06:00
vicrodh a1e9ced027 feat(downloads): complete album download status in grid overlays
- Update SearchView, ArtistDetailView, and FavoritesView
- Add download status tracking to all views with AlbumCards
- Display Open Folder and Re-download options when album is fully downloaded
- All grid overlays now show download status consistently

cp
2026-01-15 00:28:14 -06:00
vicrodh 7952bbb7d6 feat(downloads): add album download status to grid overlays (partial)
- Add backend command to check if album is fully downloaded
- Add frontend functions to check album download status
- Pass download handlers to HomeView
- Update HomeView AlbumCards with download status props

cp
2026-01-15 00:23:58 -06:00
vicrodh 932d13829e fix(download): resolve file_path field access error in open_album_folder
CachedTrackInfo struct does not have file_path field exposed.
Use db.get_file_path() method instead to retrieve track path.

cp
2026-01-15 00:14:18 -06:00
vicrodh c30c16145e feat(downloads): add smart download menu for fully downloaded albums
- Add submenu to album download option when album is fully downloaded
- New options: Open containing folder and Re-download album
- Backend command to open album folder in file manager
- Helper function to check if album is fully downloaded
- Works in both AlbumCard overlay and AlbumDetailView menus

cp
2026-01-15 00:07:54 -06:00
vicrodh 11d263a2bf feat: add automatic migration dialog for legacy downloads
Implement user-consent migration system for legacy numeric-named FLAC files:
- Create MigrationModal component with progress tracking
- Auto-detect legacy downloads on settings mount
- Show modal with migration details and consent dialog
- Real-time progress updates via Tauri events
- Display success/failure stats after migration
- Refresh library and stats after completion

cc
2026-01-14 23:57:20 -06:00
vicrodh 0da14a1b23 docs: add data migration section to README
Added instructions for migrating data from qbz-nix to qbz paths.
This helps existing users transition to the unified path structure.

cp
2026-01-14 23:50:10 -06:00
vicrodh 5f725195c2 fix: unify data paths to use qbz instead of qbz-nix
Changes all application data paths from qbz-nix to qbz:
- Cache directory: ~/.cache/qbz-nix -> ~/.cache/qbz
- Config directory: ~/.config/qbz-nix -> ~/.config/qbz
- Data directory: ~/.local/share/qbz-nix -> ~/.local/share/qbz

This fixes path inconsistencies between development and production builds
and resolves asset protocol permission issues with downloaded album artwork.

cp
2026-01-14 23:49:30 -06:00
vicrodh 94e26cd593 fix(library): prevent duplicate entries for re-downloaded tracks
- Remove existing qobuz_track_id entry before inserting new one
- Ensures clean database state when re-downloading same track
- Prevents artwork and metadata confusion from duplicates

cp
2026-01-14 23:32:55 -06:00
vicrodh 6ac622d69b fix(audio): use UltraHiRes quality for downloads and playback
- Changed download quality from HiRes to UltraHiRes to support 24-bit/192kHz
- Updated playback streaming to use UltraHiRes for highest quality
- Added debug logging for artwork path storage and retrieval
- Quality fallback will still work for lower subscription tiers

cp
2026-01-14 23:32:09 -06:00
vicrodh 2d82d74b7f fix(downloads): add cover art path to local library for Qobuz downloads
Downloaded albums now properly display cover art in local library by
passing artwork_path when inserting tracks to database. Cover art is
saved as cover.jpg in album directory during post-processing.

cp
2026-01-14 23:20:36 -06:00
vicrodh 481b1d18d7 feat(downloads): add album cover art file alongside embedded artwork
Save cover.jpg in album directory for local library scanning
to properly display album art in grid/list views

cp
2026-01-14 23:12:40 -06:00
vicrodh b414301df3 feat: add automatic legacy download migration system
Migration service for users with old numeric FLAC files:
- Detect legacy downloads (123456.flac in tracks/ folder)
- Fetch complete metadata from Qobuz API
- Apply FLAC tags and embed artwork
- Organize files into Artist/Album/Track structure
- Insert to library DB with proper grouping keys
- Delete legacy files after successful migration
- Progress tracking via events

Commands:
- detect_legacy_downloads: Check if migration needed
- start_legacy_migration: Start background migration task

Events:
- migration:progress: Real-time status updates
- migration:complete: Final report with success/failure counts

Architecture:
- Non-destructive (keeps originals until success)
- Async with progress callback
- Error recovery (continues on failures)
- Proper cleanup after success

Next steps:
- Add UI banner in Settings when legacy files detected
- Show migration progress dialog
- Display results after completion

cp
2026-01-14 23:10:25 -06:00
vicrodh f1dcd96e14 fix: complete database insertion for Qobuz downloads
Critical bug fix:
- insert_qobuz_download_with_grouping() was missing required NOT NULL fields
- Added file_size_bytes, last_modified, indexed_at to INSERT
- Extract bit_depth and sample_rate from FLAC file properties
- Proper type conversion for bit_depth (u8 -> u32)

Root cause:
- INSERT statement incomplete vs schema requirements
- Silent failure in post_process_track()
- Downloaded tracks organized correctly but never inserted to library DB
- Local Library view empty despite toggle ON

Now working:
- Download completes successfully
- FLAC tags and artwork embedded
- Files organized as Artist/Album/Track.flac
- Track inserted to local_tracks with source='qobuz_download'
- Albums appear in Local Library when toggle ON

cp
2026-01-14 23:07:54 -06:00
vicrodh 0b72c3fba9 fix(downloads): add album grouping keys for proper library display
Critical fix for downloads not appearing in library:

Problem: Downloads inserted without album_group_key/album_group_title
Result: Albums not grouped/displayed in Local Library UI

Solution:
1. Create insert_qobuz_download_with_grouping() method
2. Pass all metadata: album_artist, track_number, year, etc.
3. Generate album_group_key: 'album|album_artist'
4. Set album_group_title for proper display

Now downloads will:
- Group correctly by album in Local Library
- Show proper album artist (not track artist)
- Display track numbers and year
- Appear in UI when toggle is ON

cp
2026-01-14 22:51:03 -06:00
vicrodh 01be29133a feat(downloads): smart library integration with visibility toggle
Implement intelligent library insertion:
- Downloads ALWAYS inserted to library DB (persistence)
- Visibility controlled by toggle in Settings
- Downloads NOT added to scan folders (separate from local files)

Backend changes:
1. Simplified post_process_track to always insert
2. Created get_albums_with_filter() method
3. Added source filter: exclude 'qobuz_download' when toggle off
4. Wire download_settings_state to library_get_albums command
5. Read show_in_library setting and pass to DB query

Database filtering:
- When toggle ON: show all albums (local + downloads)
- When toggle OFF: filter out source='qobuz_download'
- Hidden albums filter still works independently

Design benefits:
- Downloads folder never scanned by Local Library
- Tracks always in DB for potential future features
- Clean separation: local files vs Qobuz downloads
- Toggle only affects UI visibility, not data persistence

cp
2026-01-14 22:46:21 -06:00
vicrodh 49da0832b9 feat(downloads): add library integration to post-processing
Complete the downloads-library integration:
- Add library_db parameter to post_process_track()
- Accept show_in_library flag
- Insert processed tracks into local library automatically
- Pass library_state to download_track command
- Clone library_db for async task

Post-processing pipeline now:
1. Download → mark complete
2. Fetch metadata from Qobuz
3. Write FLAC tags with all metadata
4. Download and embed artwork
5. Organize to Artist/Album/Track.flac structure
6. Update download cache DB with new path
7. **Insert into local library if show_in_library enabled**
8. Emit processed event

Files are now:
- Properly tagged with metadata
- Organized in artist/album folders
- Available in Local Library (if toggle on)
- Ready for playback with artwork

cp
2026-01-14 22:32:46 -06:00
vicrodh e12783a50e feat(downloads): implement complete post-processing pipeline
Wire up Phase 3 functionality to download completion:
- Add post_process_track() function with full pipeline
- Fetch complete metadata from Qobuz API
- Write FLAC tags with all metadata fields
- Embed artwork from Qobuz
- Organize files into Artist/Album/Track structure
- Update database with new organized path
- Emit download:processed event for UI

Post-processing now runs automatically after download:
1. Download completes → mark_complete()
2. Fetch metadata from Qobuz API
3. Write tags to FLAC file
4. Download and embed artwork
5. Move file to: <root>/<Artist>/<Album>/NN - Title.flac
6. Update database with new path
7. Emit processed event

Files now properly organized with full metadata!

cp
2026-01-14 22:31:21 -06:00
vicrodh f69a283b31 wip(downloads): identify missing post-processing pipeline
Problem identified: Downloads complete but do not trigger:
1. Metadata enhancement from Qobuz API
2. FLAC tag writing
3. File organization (artist/album structure)
4. Library insertion

Current state:
- Files saved as {track_id}.flac in tracks/ folder
- No metadata embedded
- Not added to local library
- Phase 3 code exists but not wired to download completion

Next steps:
- Wire post-processing to download completion
- Or create manual command to process existing downloads
- Ensure proper state passing (settings, library)

cp
2026-01-14 22:28:59 -06:00
vicrodh 8c458c6b03 refactor(ui): unify duplicate Downloads sections in Settings
Merge two separate Downloads sections into one unified section:
- Combine configuration (folder picker, library toggle)
- Combine statistics (track count, storage size)
- Combine actions (clear, open folder)
- Remove duplicate Downloads Section (Offline Storage)
- Use consistent labels without translations for new items
- Single cohesive Downloads section with all functionality

Now Downloads section contains:
- Download Folder configuration with Change button
- Downloaded Tracks statistics
- Show in Local Library toggle
- Clear Downloads button
- Open Folder button

cp
2026-01-14 22:20:11 -06:00
vicrodh d2f2afaf47 feat(downloads): phase 6 complete - mount status and error handling
Phase 6 implementation verified complete:
- Mount status validation in path_validator
- check_download_root_mounted command
- validate_download_path validates mount status
- move_downloads_to_path command
- PathValidationResult includes NotMounted status
- Error handling for unmounted drives

All Phase 6 functionality already implemented in Phase 2.

All 6 phases complete:
✅ Phase 1: Database Schema & Settings Store
✅ Phase 2: Download Path Management (includes mount validation)
✅ Phase 3: Metadata Enhancement & FLAC Tagging
✅ Phase 4: Local Library Integration
✅ Phase 5: Download Cache Cleanup Integration
✅ Phase 6: Mount Status & Error Handling

cp
2026-01-14 22:18:33 -06:00
vicrodh 24ea59ed28 feat(downloads): add download folder configuration UI
Add UI for configuring download folder location in Settings:
- Add downloadRoot state variable
- Add Downloads section in Settings with folder picker
- Move show_in_library toggle to Downloads section
- Add handleChangeDownloadFolder() function with dialog picker
- Validate path before applying
- Prompt to move existing downloads on path change
- Display current download folder path
- Use @tauri-apps/plugin-dialog for folder selection
- Fix property name (readyTracks vs ready_tracks)

Users can now configure where downloads are stored and
optionally move existing downloads to new location.

cp
2026-01-14 22:17:28 -06:00
vicrodh 2cc47a80c4 feat(downloads): phase 5 complete - cleanup integration
Add library cleanup integration for download cache:
- Add remove_qobuz_download() method to LibraryDatabase
- Add remove_all_qobuz_downloads() method to LibraryDatabase
- Update remove_downloaded_track command to also remove from library
- Update clear_download_cache command to remove all from library
- Properly scope database locks to avoid deadlocks
- Log removal count when clearing all downloads

When downloads are removed from cache, they are automatically
removed from the local library to maintain consistency.

Phase 5 complete.

cp
2026-01-14 21:08:11 -06:00
vicrodh 5952da661b fix(ui): move Qobuz downloads toggle to general Settings
Move download visibility toggle from LocalLibrary settings to general Settings view:
- Add showQobuzDownloadsInLibrary state in SettingsView
- Add loadDownloadSettings() function
- Add handleShowDownloadsChange() function
- Add toggle in Library section of Settings
- Remove toggle from LocalLibrary settings panel
- Remove toggleShowQobuzDownloads function from LocalLibrary
- Remove showQobuzDownloads state from LocalLibrary
- Restore settings-actions original flex layout

Qobuz downloads are now controlled from Settings > Library section,
not from LocalLibrary settings. LocalLibrary only handles hide/show
of individual albums.

cp
2026-01-14 20:59:00 -06:00
vicrodh 96a3c56388 feat(downloads): phase 4 complete - UI integration for library settings
Add UI integration for Qobuz downloads in Local Library:
- Add showQobuzDownloads state variable
- Load download settings on library data load
- Add toggleShowQobuzDownloads function
- Add toggle setting in Library Settings panel
- Add .toggle-setting styles for checkbox
- Reload library after toggling setting
- Update settings-actions layout to column flex

Phase 4 complete with backend + UI integration.
Users can now toggle Qobuz downloads visibility in library.

cp
2026-01-14 20:52:42 -06:00
vicrodh a890802d8c feat(downloads): phase 4 complete - library integration backend
Complete library integration for Qobuz downloads:
- Add conn() method to DownloadCacheDb for direct SQL access
- Implement insert_qobuz_download_direct with proper parameters
- Complete library_backfill_downloads command with Send-safe async
- Properly scope database locks to avoid Send trait issues
- Register library_backfill_downloads command in Tauri
- Add BackfillReport struct for migration tracking
- Query ready downloads directly from download_cache DB
- Insert downloads into library with source = 'qobuz_download'
- Check for existing tracks before insertion

Phase 4 backend complete. UI integration pending.

cp
2026-01-14 20:49:28 -06:00
vicrodh daa07ef9ce feat(downloads): phase 4 partial - library integration foundation
Add foundation for Qobuz downloads in local library:
- Extend get_albums to filter by source (user vs qobuz_download)
- Add include_qobuz_downloads parameter from download settings
- Create library_backfill_downloads command with report
- Add track_exists_by_qobuz_id method
- Add insert_qobuz_download method (WIP - needs file path resolution)
- BackfillReport struct for tracking migration

Phase 4 in progress - needs completion for file path handling and
UI integration. Will continue in next session.

cp
2026-01-14 20:17:44 -06:00
vicrodh b4ba435878 feat(downloads): phase 3 - metadata enhancement and FLAC tagging
Add complete metadata handling for downloaded tracks:
- Create metadata.rs module with CompleteTrackMetadata struct
- Implement fetch_complete_metadata from Qobuz API
- Add write_flac_tags using lofty crate (Vorbis comments)
- Implement embed_artwork with MIME type detection
- Add sanitize_filename for ASCII-safe names
- Create organize_download with artist/album structure
- Handle filename conflicts with counter
- Add update_file_path and update_artwork_path to DB
- Parse year from release_date_original format

Phase 3 of downloads-library integration plan.

cp
2026-01-14 20:14:07 -06:00
vicrodh 1296ee4a4b feat(downloads): phase 2 - download path management
Add path validation and file moving capabilities:
- Create path_validator module with validation logic
- Check write permissions via test file
- Detect mount status with canonicalize check
- Implement move_downloads_to_new_path with report
- Add mount status cache (30s TTL)
- Add Tauri commands: check_mount, validate_path, move_downloads
- Recursive FLAC file collection for moving

Phase 2 of downloads-library integration plan.

cp
2026-01-14 20:10:25 -06:00
vicrodh 494d3d184e feat(downloads): phase 1 - database schema and settings store
Add foundation for Qobuz downloads integration:
- Create DownloadSettings store (download_root, show_in_library)
- Add migration for local_tracks: source and qobuz_track_id columns
- Add database indices for source and qobuz_track_id
- Register Tauri commands for download settings
- Commands: get/set download_settings, validate_download_root

Phase 1 of downloads-library integration plan.

cp
2026-01-14 20:01:51 -06:00
vicrodh 7eb12b36bf docs(readme): integrate API key development instructions
- Remove separate DEV_API_KEYS.md file
- Add compile-time env var explanation in README
- Document npm run dev:tauri command usage
- Explain why .env must be sourced before build

cp
2026-01-14 19:58:32 -06:00
vicrodh 6e21b3ed1f docs(dev): add script and docs for local API key loading
- Create dev-with-env.sh script to load .env before build
- Add npm run dev:tauri command that uses the script
- Document why .env must be loaded before compilation
- Explain compile-time vs runtime environment variables

The issue: option_env!() reads vars at compile time, but .env
loads at runtime. Solution: source .env before cargo build.

cp
2026-01-14 19:43:18 -06:00
vicrodh b9c8ecb274 fix(library): improve clear library safety with double confirmation
- Add double confirmation dialog for clear library action
- Improve confirmation messages with clear warnings
- Move clear library button to separate danger zone section
- Use smaller danger button style (12px font, 6px padding)
- Add danger zone header with red warning label
- Separate dangerous action from regular settings visually
- Add error alert if clear operation fails

This prevents accidental library clearing which requires full rescan.

cp
2026-01-14 19:29:26 -06:00
vicrodh 9bee038cf2 feat(library): improve folder list with table view and multi-select
- Replace folder list with compact table view (max 150px height)
- Add checkbox selection for multiple folders
- Replace per-row delete buttons with single remove action
- Add folder actions toolbar with + and - buttons
- Implement multi-folder removal with confirmation
- Reduce row height to 36px for more compact display
- Add scroll with custom styling for overflow
- Selected rows highlight with blue background

cp
2026-01-14 19:24:54 -06:00
vicrodh 08e2c98a5b feat(library): add album edit modal with hide toggle
- Remove hide button from album row list view
- Add edit button (pencil icon) in album detail header
- Create album edit modal with hide toggle
- Add nav-row layout matching PlaylistDetailView style
- Modal styling consistent with existing PlaylistModal
- Album title editing placeholder (coming soon)

cp
2026-01-14 19:15:09 -06:00
vicrodh 3eb80c7840 feat(library): remove album limit and add album hide feature
- Remove 100 album cap from library_get_albums query
- Add album_settings table with hidden flag per album
- Add commands to hide/show albums
- Add UI toggle in settings to view hidden albums
- Add hide button to album list view
- Update LocalLibraryView to support hidden albums view

cp
2026-01-14 14:57:58 -06:00
vicrodh 3cfe3c1333 feat(i18n): add translations to main UI components
- Sidebar: navigation labels, playlist section, sort options
- SearchView: search placeholder, tabs, results messages
- HomeView: section titles, loading states, empty states
- QueuePanel: headers, search, empty state, actions
- NowPlayingBar: player controls, tooltips, cast buttons
- FocusMode: close button, lyrics loading
- HomeSettingsModal: all settings labels and descriptions

Added new translation keys to en.json and es.json locales.
2026-01-14 10:12:38 -06:00
vicrodh 5c869eeae9 refactor(settings): remove unused features, implement working i18n
- Remove Compact Mode toggle (feature was not implemented)
- Remove Storage Limit dropdown from Downloads (always 2GB, not functional)
- Connect language dropdown to svelte-i18n system
- Language setting now properly persists and changes app locale
- Add comprehensive translations for en and es locales
- Settings view now uses $t() for all translatable strings
- Support for Auto language detection based on browser locale
2026-01-14 09:51:12 -06:00
vicrodh 2568862aa6 chore: bump version to 1.1.5 2026-01-14 08:29:42 -06:00
vicrodh 3100f1f6fb feat(settings): add toggle for Qobuz artist images fetching
- Add Library section in Settings with toggle for artist images
- Check localStorage setting before fetching images
- Enabled by default, persists user preference
2026-01-14 08:29:38 -06:00
vicrodh 9371a38e17 feat(library): add Qobuz artist images and homologate back button
- Replace X icon with ArrowLeft for back button consistency
- Fetch Qobuz artist images for local artists (best-effort matching)
- Add circular artist image thumbnails in artist grid
- Fall back to microphone icon when no match found
2026-01-14 08:24:29 -06:00
vicrodh 544b295fa1 fix(api): increase initial album fetch limit to 100
When loading artist details, the API now fetches 100 albums instead of 50.
This ensures each album type section (Discography, EPs & Singles, Live Albums, etc.)
has enough albums loaded initially, preventing the issue where only 2 albums
appeared in each section with the rest requiring additional loading.

cc
2026-01-14 08:17:20 -06:00
vicrodh 25d0a13d6b fix(library): integrate navigation history for back/forward support
Mouse back/forward buttons now work in local library view.

Changes:
- Add 'library-album' ViewType to navigation store
- Add selectLocalAlbum(), clearLocalAlbum(), getSelectedLocalAlbumId()
- LocalLibraryView subscribes to navigation state changes
- Album clicks use selectLocalAlbum() for proper history tracking
- Back button uses navGoBack() to navigate properly
- Tab changes navigate back to 'library' when viewing album
- +page.svelte shows LocalLibraryView for both 'library' and 'library-album'

cc
2026-01-14 08:14:13 -06:00