Commit Graph
239 Commits
Author SHA1 Message Date
vicrodh 1de77ec132 feat(credits): enable track info for all Qobuz tracks + add artist link
- Add onTrackShowInfo to HomeView (Continue Listening tracks)
- Add onShowInfo to VirtualizedTrackList (for FavoritesView)
- Add onTrackShowInfo to FavoritesView and wire to VirtualizedTrackList
- Pass showTrackInfo to HomeView and FavoritesView in +page.svelte
- Add clickable artist name to TrackInfoModal header
- Artist link navigates to artist page and closes modal
2026-01-25 03:38:35 -06:00
vicrodh 3410774f32 feat(credits): add Album Credits Modal (Phase 4)
- Add get_album_credits Tauri command with TrackCredits, AlbumCredits,
  and AlbumInfo structs for consolidated album/track credits view
- Create AlbumCreditsModal component with two-column layout:
  album info (artwork, metadata, quality badges) and collapsible
  track list with performers and copyright
- Add Info button to AlbumDetailView header actions
- Integrate modal in +page.svelte with track play support
2026-01-25 02:53:46 -06:00
vicrodh 6601a3a5e6 feat(track-info): integrate TrackInfoModal with views
Phase 3 - Integration:
- Add onTrackShowInfo prop to TrackRow, AlbumDetailView,
  PlaylistDetailView, SearchView
- Add TrackInfoModal to +page.svelte with state management
- Pass showTrackInfo callback from main page to all views

cc
2026-01-25 02:28:52 -06:00
vicrodh a276a30ff2 fix(playlist): show correct track count when creating playlist with tracks
When creating a new playlist from a track, the sidebar was showing 0 tracks
because the Qobuz API returns the playlist with tracks_count: 0 at creation
time (eventual consistency). The tracks are added after, but the sidebar
refresh might get stale data.

- Update newPlaylist.tracks_count after adding tracks in PlaylistModal
- Have handlePlaylistCreated update the sidebar with correct count
- Handle both Qobuz and local track cases
2026-01-25 01:15:42 -06:00
vicrodh e7df7119d9 Add immediate sidebar sync for playlist changes
- Add onPlaylistsChanged callback to PlaylistManagerView
- Call it on: toggleHidden, toggleFavorite, reorder, edit, delete
- Connect callback to refresh sidebar playlists, settings, and local counts
- Also update PlaylistDetailView callbacks to refresh settings
2026-01-24 18:50:09 -06:00
vicrodh bdb49f65bb Fix PlaylistDetailView track list header column alignment
Update header to use flexbox layout matching AlbumDetailView pattern.
Add missing column classes: col-title, col-album, col-quality, col-icon, col-spacer.
2026-01-24 17:05:08 -06:00
vicrodh 270465e822 fix(share): implement proper album.link resolution via iTunes lookup
- Add UPC field to Album models (Rust and TypeScript)
- Enhance share_album_songlink command to use iTunes lookup:
  - First tries UPC lookup via iTunes API
  - Falls back to Odesli API with UPC
  - Then tries album title/artist search on iTunes
  - Generates direct album.link/i/{id} URLs like tracks do
- Update frontend to use the backend command instead of
  generating non-functional URL-based links

This mirrors the track sharing approach that uses ISRC/iTunes
lookup to generate working song.link URLs.
2026-01-24 12:54:59 -06:00
vicrodh bff1730aa5 fix(share): use album.link instead of song.link for albums
Odesli provides different domains for different content types:
- song.link for individual tracks
- album.link for albums

Updated album share functions and menu label accordingly.
2026-01-24 12:46:57 -06:00
vicrodh 75aeb9592f fix: remove main-content padding-left for edge-to-edge nav bars
- Removed padding-left: 20px from main-content
- Toggle button and jump-nav don't collide (different vertical positions)
- Updated all view nav bars with corrected margin/width calculations
- Nav bars now truly flush with sidebar edge
2026-01-23 18:21:49 -06:00
vicrodh 3fb597f3fb fix(settings): simplify title bar settings to hide-only option
Remove "Use QBZ title bar" toggle since switching to system decorations
doesn't work reliably on Linux when the window was created without
decorations. Keep only "Hide title bar" option for tiling WM users.
2026-01-23 16:28:50 -06:00
vicrodh 3ac957ddda feat(settings): add title bar configuration
Phase 1 implementation:
- Add titleBarStore.ts for managing title bar visibility
- "Use QBZ title bar" toggle (default ON) - switches between custom and system decorations
- "Remove title bar" toggle (default OFF) - hides title bar completely for tiling WM users
- Dynamically adjust layout heights when title bar is hidden
- Add i18n translations (en/es)
- Settings integrate with Tauri window.setDecorations() API
2026-01-23 16:16:20 -06:00
vicrodh 921639041c fix(ui): make HomeView loading overlay respect sidebar state
Pass sidebarExpanded prop to HomeView to dynamically position the
loading overlay based on sidebar width (280px expanded, 64px collapsed).
Added smooth transition for left position.
2026-01-23 16:10:43 -06:00
vicrodh 3568cea956 fix(ui): refine sidebar toggle and collapsed mode
- Reduce toggle button size from 32px to 28px
- Hide scrollbar in collapsed mode to keep icons perfectly aligned
- Add bold first line to playlist tooltips when sidebar is collapsed
- Adjust main content padding (20px) for smaller button
2026-01-23 16:00:10 -06:00
vicrodh a7f0310682 fix(ui): improve sidebar toggle button position and tooltips
- Move toggle button to sidebar edge (50% vertical, half inside/out)
- Add glass effect: rgba(255,255,255,0.08) + backdrop blur + border
- Use single chevron icons instead of double
- Hover: scale 1.1 + increased opacity
- Add left padding (22px) to main content for button clearance
- Fix playlist tooltips: show name + track count when sidebar is collapsed
2026-01-23 15:45:41 -06:00
vicrodh d0177096af feat(ui): add collapsible sidebar
- Add sidebarStore.ts for expanded/collapsed state with localStorage persistence
- Modify NavigationItem to support collapsed mode (icon-only with tooltip)
- Update Sidebar component with toggle button and collapsed styles
- Width transitions from 280px (expanded) to 64px (collapsed)
- Add i18n translations for collapse/expand actions (en/es)
2026-01-23 15:31:49 -06:00
vicrodh 6d5d264778 refactor(backend): rename module and APIs for compliance
- Renamed download_cache module to offline_cache
- Updated Tauri command names (e.g., cache_track_for_offline)
- Updated event names (offline:caching_started, etc.)
- Updated library database function names
- Updated frontend invoke calls to use new command names
2026-01-23 12:14:39 -06:00
vicrodh 84a2164079 refactor(stores): rename store to offlineCacheState
- Create offlineCacheState.ts with compliant terminology
- Update all component imports and type references
- Add compatibility aliases for gradual migration
- Remove deprecated downloadState.ts

cc
2026-01-23 11:57:53 -06:00
vicrodh 0f025ae5ef refactor(i18n): replace download terminology with offline library
- Update en.json and es.json with new terminology
- Change "Download" to "Make available offline"
- Change "Downloads" section to "Offline Library"
- Update notifications: cachingStarted, cachedForOffline, cachingFailed
- Update UI copy in SettingsView, TrackMenu, AlbumMenu
- Update toast messages in +page.svelte to use offline terminology
- Change DownloadButton tooltips to use offline language

cc
2026-01-23 11:50:17 -06:00
vicrodh 1f614c5750 fix(queue): update remaining count in real-time when tracks advance 2026-01-23 11:14:13 -06:00
vicrodh 9501a4b909 fix(queue): improve Up Next counter with total, remaining, and infinite modes
- Show format: (20 of 139, 135 left) for normal playback
- Show format: (20 of ∞) for infinite play or radio mode
- Remove Load More from Queue section (not needed)
- Add Load More to History section for tracks > 20
- Add isRadioMode prop to detect radio context
- Pass both queueTotalTracks and queueRemainingTracks
2026-01-23 11:01:08 -06:00
vicrodh e200dfd3eb fix(queue): show actual remaining tracks and ∞ when infinite play active 2026-01-23 10:53:40 -06:00
vicrodh fe3db6397a fix(queue): show real queue total in Up Next counter (X of Y) 2026-01-23 10:49:40 -06:00
vicrodh 84c2261829 feat(queue): redesign QueuePanel with tabs, history, and infinite play
- Add Queue/History tabs with new layout
- Implement Now Playing card with spectrum animation
- Add History tab showing recently played tracks from backend
- Add Infinite Play toggle (persisted to localStorage)
- Relocate search to footer (expands left)
- Add Up Next counter (X/Y format)
- Implement 20-track pagination with load more
- Add proper i18n keys for new features
- Add new SVG icons (add-to-list, trash-list)
2026-01-23 10:28:16 -06:00
vicrodh e624d770b9 feat(player): redesign queue button position and icon
- Move queue button to far right of NowPlayingBar (after volume)
- Add vertical separator between volume control and queue button
- Replace ListMusic icon with custom queue-list SVG
- Add active state: play symbol changes to accent color when panel open
- Pass queueOpen prop to track panel visibility state
2026-01-23 10:20:39 -06:00
vicrodh 1684df7752 fix(queue): complete album_id and artist_id propagation for track navigation
Ensure album_id and artist_id are passed through all queue track creation paths:
- trackActions.ts build functions (Qobuz, album, playlist, local tracks)
- Session persistence (both frontend and Rust backend)
- buildAlbumQueueTrack wrapper function
- Session restoration
2026-01-23 03:56:14 -06:00
vicrodh aabbe8ea67 fix(radio): pass album_id and artist_id for track navigation
Add album_id and artist_id fields to QueueTrack struct so that
radio tracks have proper navigation metadata. This enables
clicking artist/album in the main player to navigate correctly
when playing tracks from artist or track radio.

Changes:
- Add album_id/artist_id to Rust QueueTrack struct
- Update track_to_queue_track to extract IDs from Qobuz Track
- Add fields to frontend BackendQueueTrack interface
- Pass IDs in ArtistDetailView radio playback
- Pass IDs in playQueueTrack to playTrack service
2026-01-23 03:14:42 -06:00
vicrodh 1fdd4d9711 Merge PR #18: add album to playlist 2026-01-22 23:12:19 -06:00
Joel C 05fcd7ad5e Update label for add to playlist toast 2026-01-22 23:27:18 +01:00
Joel C edbe812d66 Simplify addAlbumToPlaylist functions 2026-01-22 23:25:38 +01:00
Joel C 6415991792 Use add to playlist on AlbumCards on ArtistDetailView 2026-01-22 23:11:15 +01:00
Joel C 8a68952658 Use add to playlist on AlbumCards on SearchView 2026-01-22 23:02:27 +01:00
Joel C 23ce992372 Use add to playlist on AlbumCards on HomeView 2026-01-22 22:56:51 +01:00
Joel C 1c89d8df57 Use Add to playlist option in AlbumDetailView 2026-01-22 22:18:59 +01:00
vicrodh 73cc935d99 fix: remove open-folder action from download menus
cx
2026-01-22 11:14:51 -06:00
vicrodh 2a8b7c6d55 feat: Qobuz™ compliance, subscription gating, and settings cleanup
cx
2026-01-22 10:33:45 -06:00
vicrodh 240c5e013a fix: Improve radio playback and session handling
- Fix radio playback initiation using onTrackPlay callback
- Fix sampling rate display for Qobuz tracks (already in kHz)
- Disable session restore to prevent local/Qobuz ID conflicts
2026-01-20 20:16:42 -06:00
vicrodh 04cd97385a feat: Add radio context type to frontend playback context store 2026-01-20 17:40:36 -06:00
vicrodh 4941a38a2b Add Download functionality to PlaylistDetailView
- Added onTrackOpenFolder and onTrackReDownload to Props interface
- Pass download props to menuActions in TrackRow
- Only show Download options for Qobuz tracks (not local tracks)
- Wire up handlers in main app component
- Completes Download menu implementation across all views
2026-01-19 21:53:59 -06:00
vicrodh b1abb00a8b Wire up Download handlers in main app component
- Added handleTrackOpenFolder, handleTrackReDownload, and checkTrackDownloaded handlers
- Imported openTrackFolder from downloadState.ts
- Connected all handlers to HomeView, AlbumDetailView, SearchView, and FavoritesView
- Download submenu now fully functional across all Qobuz track views
2026-01-19 21:17:47 -06:00
vicrodh c7fdc52741 Expand HomeView context menu from 1 to 8 actions
HomeView 'Continue Listening' tracks now have complete context menu:
- onPlayNow ✓
- onPlayNext ✓ (NEW)
- onPlayLater ✓ (NEW)
- onAddToPlaylist ✓ (NEW)
- onShareQobuz ✓ (NEW)
- onShareSonglink ✓ (NEW)
- onGoToAlbum ✓ (NEW)
- onGoToArtist ✓ (NEW)

This matches the complete context menu available in AlbumDetailView,
FavoritesView, and other Qobuz track displays.

Files modified:
- src/lib/components/views/HomeView.svelte - Added track action props
- src/routes/+page.svelte - Passed track action handlers to HomeView
2026-01-19 20:52:07 -06:00
vicrodh 1e7475e308 Fix sample rate decimal precision for bit-perfect playback (CRITICAL)
Problem:
- sample_rate stored as INTEGER in DB and u32 in Rust
- Fractional rates (44.1, 88.2, 176.4 kHz) stored as 44100, 88200, 176400 Hz
- Integer division (44100 / 1000 = 44) lost decimals
- DAC badge showed "resampling 44 → 44.1 kHz" false positive
- Breaks bit-perfect guarantee - user requirement: "no es negociable"

Root Cause:
- DB schema: sample_rate INTEGER (44100 Hz)
- Frontend: Math.round(44100 / 1000) = 44 kHz (lost .1)
- Badge: Compared 44 kHz vs 44.1 kHz → false resampling warning

Solution:
1. Changed LocalTrack.sample_rate from u32 to f64 (models.rs)
2. Changed AudioProperties.sample_rate from u32 to f64 (models.rs)
3. Changed DB schema from INTEGER to REAL (database.rs)
4. Added migration to convert existing data (database.rs)
5. Updated metadata extraction to cast to f64 (metadata.rs)
6. Fixed frontend to use float division without rounding (+page.svelte)

Migration:
- Checks if sample_rate is INTEGER
- Creates temp table with REAL, copies data, drops old, renames
- Preserves all data and indexes
- Runs automatically on app start

Result:
- 44100 Hz stored as 44100.0
- Division: 44100.0 / 1000.0 = 44.1 kHz (exact)
- Badge: 44.1 kHz = 44.1 kHz → no resampling (correct)
- Bit-perfect guarantee restored

Files modified:
- src-tauri/src/library/models.rs - Changed sample_rate to f64 in structs
- src-tauri/src/library/metadata.rs - Cast sample_rate to f64
- src-tauri/src/library/database.rs - Changed schema to REAL + migration
- src/routes/+page.svelte - Fixed division to preserve decimals
2026-01-19 19:49:34 -06:00
vicrodh 61fa05da93 Fix critical shuffle queue bug, Local Library context, and sample rate crash
1. QUEUE SHUFFLE FIX (CRITICAL):
   - When shuffle enabled and set_queue called, starting track was placed randomly in shuffle_order
   - This caused queue UI to show only tracks AFTER that random position
   - Example: 11 tracks, start at index 5, but index 5 was at position 7 in shuffle → only 3 tracks visible
   - FIX: When shuffle enabled, swap starting track to position 0 in shuffle_order
   - Now all tracks appear in queue UI as expected

2. LOCAL LIBRARY CONTEXT FIX:
   - handleLocalTrackPlay was clearing context immediately after LocalLibraryView set it
   - FIX: Removed clearPlaybackContext() call - LocalLibraryView handles context correctly
   - Context icon should now display for Local Library playback

3. SAMPLE RATE CRASH FIX:
   - show_track_notification expected u32 but received f64 (44.1, 88.2, etc.)
   - Error: "invalid type: floating point 44.1, expected u32"
   - FIX: Changed sample_rate parameter from u32 to f64 in notification command and format_quality
   - Bonus: Format shows "44.1" for fractional rates, "48" for whole numbers

Files modified:
- src-tauri/src/queue/mod.rs - Fixed set_queue to move start_index to front of shuffle_order
- src/routes/+page.svelte - Removed clearPlaybackContext from handleLocalTrackPlay
- src-tauri/src/commands/notification.rs - Changed sample_rate to f64 with proper formatting
2026-01-19 19:13:07 -06:00
vicrodh 3d8c049226 Fix Qobuz album shuffle to start with random track and add debug logs
- Modified handleShuffleAlbum to pick random starting track (same fix as Local Library)
- Added comprehensive debug logs to handleAlbumTrackPlay to diagnose queue issues
- Fixed favoritesStore crash when response.tracks is undefined (defensive checks)

Fixes:
- Qobuz album shuffle no longer always starts with first track
- App no longer crashes on startup with "undefined is not an object (evaluating 'response.tracks.items')"
2026-01-19 19:02:46 -06:00
vicrodh 7d9071442f fix(layout): keep NowPlayingBar out of app-body
cx
2026-01-19 14:51:14 -06:00
vicrodh 0701892ed5 fix(local): clear context and seed queue
cx
2026-01-19 13:10:42 -06:00
vicrodh 1fae9b7d9f fix(ui): wire active state in lists
cx
2026-01-19 13:02:43 -06:00
vicrodh c59ab226b9 fix(playback): honor autoplay and seed queues
cx
2026-01-19 12:46:28 -06:00
vicrodh 7c4fb6d483 fix(favorites): show active track and icon
cx
2026-01-19 12:42:27 -06:00
vicrodh 395fd165d4 feat(player): add volume sliders to FocusMode and MiniPlayer
cx
2026-01-19 11:26:08 -06:00
vicrodh 318e3d795a feat(context): scroll to active track on context navigation
cx
2026-01-19 11:19:52 -06:00