Commit Graph
457 Commits
Author SHA1 Message Date
vicrodh 7d0aa215a5 feat(streaming): implement incremental decoding for true streaming playback
BREAKING CHANGE: Replace blocking decode_streaming_source with IncrementalStreamingSource

Key improvements:
- IncrementalStreamingSource implements rodio::Source and decodes packets on-demand
- Playback starts immediately after initial buffer (512KB default) fills
- Audio is decoded incrementally while download continues in background
- Reduced initial buffer from 2MB to 512KB for faster startup
- Added fast_start() config option for minimal 256KB buffer

The previous implementation blocked until the ENTIRE file was downloaded
and decoded, making streaming slower than traditional download-first.
Now playback truly starts within ~1 second of initial buffer filling.

Signed-off-by: cpvsc
2026-01-25 13:50:24 -06:00
vicrodh 36b3a4da56 refactor(streaming): remove unused writer field from PlayStreaming command
The download task is spawned before the command is sent, so the writer
doesn't need to be included in the command payload.

cpvsc
2026-01-25 12:41:08 -06:00
vicrodh 39dd249f98 feat(streaming): integrate streaming playback in play_track command
- Add PlayStreaming variant to AudioCommand enum
- Add play_streaming() method to Player for starting stream-first playback
- Modify play_track command to check stream_first_track setting
- Add get_stream_info() for HEAD request to get content-length
- Add extract_audio_format_from_header() to probe audio format from initial bytes
- Add download_and_stream() for async chunked download with buffer push
- Update BufferedMediaSource with create_reader() for independent read positions
- Add has_min_buffer() method for playback readiness check
- Implement Clone for BufferWriter

Phases 3-4/7: Conditional streaming path with async download integration

cpvsc
2026-01-25 12:39:43 -06:00
vicrodh 5519fc7b25 feat(streaming): add BufferedMediaSource for streaming playback
- Create streaming_source.rs with BufferedMediaSource implementation
- Implements Read + Seek + MediaSource traits for symphonia compatibility
- BufferWriter allows async chunk pushing from HTTP downloads
- StreamingConfig with configurable min_buffer and max_buffer sizes
- Supports seeking within buffered range and EOF detection
- Thread-safe with Arc<Mutex<>> interior for shared state
- Includes comprehensive unit test suite

Phase 2/7: Core streaming infrastructure for first-track playback

cpvsc
2026-01-25 12:25:41 -06:00
vicrodh 1d0e069be1 feat(config): add stream_first_track setting to AudioSettings
Add two new fields to AudioSettings struct:
- stream_first_track: bool flag to enable streaming for uncached tracks
- stream_buffer_seconds: u8 for initial buffer size (1-10 seconds)

Includes:
- Database schema migration for existing users
- Getter/setter methods in AudioSettingsStore
- Tauri commands for frontend integration
- Registration in lib.rs invoke_handler

cpvsc
2026-01-25 12:20:47 -06:00
vicrodh 2136a2a0e7 feat(search): add search type filters for refined results
Backend:
- Add search_type parameter to search_albums, search_tracks, search_artists
- Pass optional type filter to Qobuz API (Performer, Composer, Label, ReleaseName)

Frontend:
- Add SearchFilterType to search state management
- Add filter radio buttons in SearchView (visible when results exist)
- Remove redundant counts from tabs
- Add Clear filter button independent from Clear search
- Filters reset automatically when starting new search or clearing

Filters allow finding performers, composers, and labels that default
search misses (e.g., searching "Nicko McBrain" with Performer filter
shows Iron Maiden tracks)
2026-01-25 12:04:49 -06:00
vicrodh 6467ca038e feat: add LabelView to browse albums by record label
- Add get_label API endpoint and Tauri command
- Create LabelView component with album grid, search, and infinite scroll
- Add clickable label links in AlbumDetailView, AlbumCreditsModal, and TrackInfoModal
- Add label_id to AlbumInfo and AlbumDetail types
- Add label to QobuzTrack album summary for track info display
2026-01-25 11:28:51 -06:00
vicrodh 04197b98f0 feat(musicbrainz): add smart playlist generation backend (Stage 4)
- Add PlaylistRule enum with BandMembers, ArtistGroups, CollaboratorNetwork variants
- Add GeneratedPlaylist struct for playlist preview results
- Add PlaylistGenerationConfig for customizing track limits
- Implement smart_playlist_preview command to generate playlists from MusicBrainz relationships
- Implement smart_playlist_resolve_artist helper to find artist MBID by name
- Implement smart_playlist_get_available_types to check what playlist types are available
- Search Qobuz for member/collaborator tracks and return matching track IDs
2026-01-25 09:51:47 -06:00
vicrodh 23d208b3d0 feat: implement ListenBrainz integration (Stage 2)
Add ListenBrainz scrobbling support with:
- Client module for ListenBrainz API
- Token-based authentication (user provides token from listenbrainz.org)
- Now-playing submission support
- Scrobble submission with MusicBrainz enrichment
- SQLite-based offline queue with TTL
- Credential persistence across sessions
- Settings UI for connection management

API integration uses Stage 1 MusicBrainz data to enrich scrobbles with
recording MBID, release MBID, and artist MBIDs when available.

cc
2026-01-25 06:49:40 -06:00
vicrodh 55693e66ba feat(musicbrainz): add MusicBrainz integration engine (Stage 1)
- Add MusicBrainz client with rate limiting (1 req/sec)
- Add SQLite cache with TTL for recordings, artists, releases
- Add Tauri commands for entity resolution
- Support ISRC, UPC/barcode, and name-based lookups
- Include artist relationship extraction (Stage 3 prep)

cc
2026-01-25 06:33:35 -06:00
vicrodh 6eff22632a feat(credits): complete Album Credits Modal with Review tab
- Use custom info SVG icon without circle outline
- All tracks collapsed by default (removed auto-expand)
- Add description field to Album model for editorial reviews
- Implement Review tab with album description content
- Tab switches between Credits (track list) and Review (description)
- Review tab disabled when no description available
2026-01-25 03:09:53 -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 e767809857 feat(track-info): add TrackInfoModal and context menu option
Phase 2 of track-info feature:
- Add performers, composer, copyright fields to Track model
- Add get_track_info command with parsed performers
- Create TrackInfoModal component to display track details and credits
- Add "Track info" option to TrackMenu context menu

cc
2026-01-25 02:23:42 -06:00
vicrodh eccadb6af9 feat(api): add performers string parser
Parse Qobuz performers field into structured data.
Format: "Name, Role1, Role2 - Name, Role1 - ..."

cc
2026-01-25 02:17:24 -06:00
vicrodh dcbe7e802a feat(playlist): track copied playlists and add attribution
- Hide "Copy to My Library" button after playlist has been copied
- Persist copied playlist IDs in localStorage for subsequent visits
- Add attribution note to description: "Originally curated by X on Qobuz"
2026-01-25 01:39:32 -06:00
vicrodh ee31c3e445 feat(playlist): add ability to copy Qobuz playlists to user library
When viewing a playlist not owned by the current user, a new "Copy to
My Library" button appears between the favorite and context menu buttons.
Clicking it creates a copy of the playlist with all its tracks in the
user's library.

- Add get_current_user_id command to check playlist ownership
- Add subscribe_playlist command to copy playlist with all tracks
- Add ListPlus button in PlaylistDetailView for non-owned playlists
- Button only shows for playlists owned by others (e.g., Qobuz curated)
2026-01-25 01:34:43 -06:00
vicrodh 49a0a4223e fix(db): Move folder_id index creation to after migrations
The index was being created during schema execution, but for existing
databases the column doesn't exist until the migration runs. Now the
index is created after all migrations have completed.
2026-01-24 23:38:57 -06:00
vicrodh e5779ce6cf feat(backend): Add playlist folders Phase 1 - database and Tauri commands
- Add uuid crate dependency for folder ID generation
- Add PlaylistFolder struct and database schema
- Add folder_id field to PlaylistSettings
- Add database migration for existing installations
- Add CRUD methods for playlist folders:
  - create_playlist_folder
  - get_all_playlist_folders
  - get_playlist_folder
  - update_playlist_folder
  - delete_playlist_folder
  - reorder_playlist_folders
  - move_playlist_to_folder
  - get_playlists_in_folder
- Register Tauri commands for frontend integration
2026-01-24 23:15:48 -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 e86734c9a7 fix(tray): restore window properly from tray menu
Add unminimize() call to show_hide menu handler to match left-click
behavior. Also add logging for debugging visibility state.
2026-01-23 16:49:33 -06:00
vicrodh 077aa01356 feat(settings): add system tray settings
Add tray icon configuration options:
- Enable/disable tray icon (requires restart)
- Minimize to tray: hide window when clicking minimize
- Close to tray: hide window instead of quitting

Rust backend: TraySettingsState with SQLite persistence
Frontend: SettingsView tray subsection with toggles

Related to #15 (title bar settings)
2026-01-23 16:38:17 -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 712c7be4f7 fix(player): add delay after engine stop to prevent sink contention
Add 50ms delay after stopping the previous playback engine to allow
the rodio Sink to fully release its reference to the OutputStreamHandle.
This prevents "resource busy" errors when rapidly switching tracks,
especially when selecting from search while radio is playing.
2026-01-23 10:17:58 -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 2ea767f37c feat(radio): implement 50-track initial queue and auto-refill support
Radio improvements:
- Increase initial tracks from 15 to 50
- Add refill_radio_queue command (generates 20 more when queue low)
- Add get_queue_remaining command to check queue size
- Add create_infinite_radio command for "Keep Playing" feature
- Add InfiniteRadio autoplay mode based on last 5 tracks

Backend infrastructure ready for:
- Auto-refill when queue drops below 10 tracks
- Infinite playback when normal queue ends
2026-01-23 03:45:51 -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 9504294907 fix: remove track limit completely from library search
- Backend now supports limit=0 meaning "no limit"
- Frontend passes limit=0 to fetch all tracks
- Search now works across entire library regardless of size
- Virtualization handles rendering efficiently
2026-01-23 01:53:37 -06:00
vicrodh 58badcc64b fix: improve app identification in task managers
Set GTK_APPLICATION_ID for proper WM_CLASS and add desktop template
with StartupWMClass for correct process identification on Linux.
Also add window label for Tauri window configuration.
2026-01-23 01:50:27 -06:00
vicrodh 66d6ffb6ed feat: add canonical artist name normalization
- Add canonical_name column to artist_images table (migration)
- Store canonical names from Qobuz when fetching artist images
- Display canonical names (properly capitalized) in artist views
- Group and sort artists by canonical name when available
- Source priority: Qobuz -> Discogs -> Metadata

This ensures "Alice in chains" displays as "Alice In Chains" based on
Qobuz's authoritative naming.
2026-01-23 01:35:55 -06:00
vicrodh eec512a3f9 fix: address UI and performance issues in LocalLibrary
- Fix asset protocol scope for thumbnails in tauri.conf.json
- Homologate artist view controls to match album controls pattern
- Make artist grouping optional with dropdown (Off, A-Z)
- Change grid/list to single toggle button for artists
- Allow 3 lines for artist names in grid view
- Fix album card width to prevent title overflow
- Add throttling to artist image fetch to avoid rate limiting
2026-01-23 01:20:55 -06:00
vicrodh fc03bee9b1 feat(thumbnails): add backend thumbnail generation system 2026-01-23 01:07:16 -06:00
vicrodh b86effe4e9 perf(library): optimize artists and search queries
Extend SQL-based filtering to artists and search:
- Add get_artists_with_filter() method that filters source and
  network folders directly in SQL
- Replace library_get_artists N+1 loop that was calling
  db.search(artist.name, 10000) for EACH artist
- Add search_with_filter() method for optimized track search
- Replace library_search post-query filtering with SQL predicates

These changes eliminate thousands of redundant database queries
when browsing large libraries with network folders or Qobuz downloads.

Part of #13 - LocalLibrary performance optimization
2026-01-22 23:56:42 -06:00
vicrodh befe93e619 perf(library): fix N+1 query and reduce logging overhead
Backend performance improvements for large libraries:
- Change per-album INFO logging to DEBUG level (was logging every
  album during deserialization, causing 10k+ log lines)
- Add get_albums_with_full_filter() method that filters network
  folders directly in SQL instead of N+1 query pattern
- Replace library_get_albums N+1 loop with single SQL query
  (was doing 1 + N queries for N albums when excluding network folders)

Frontend infrastructure:
- Add libraryPerformanceStore.ts with feature flags for:
  - virtualizationEnabled (default: true)
  - thumbnailsEnabled (default: false, for future use)
  - optimizedNetworkFilter (default: true)
  - albumSearchDebounceMs (default: 150)
  - performanceModeThreshold (default: 500 albums)
  - forcePerformanceMode (default: false)

Part of #13 - LocalLibrary performance optimization
2026-01-22 23:55:16 -06:00
vicrodh 2a8b7c6d55 feat: Qobuz™ compliance, subscription gating, and settings cleanup
cx
2026-01-22 10:33:45 -06:00
vicrodh 52def4b7e8 fix: Restore Music category in tauri.conf.json (AudioVideo is invalid for Tauri) 2026-01-20 22:15:19 -06:00
vicrodh 6260b2f66c chore: Bump version to 1.1.6 for release 2026-01-20 22:00:40 -06:00
vicrodh 43ed44daf7 chore: Improve desktop integration and AppImage metadata for release
- Add Comment field to all .desktop files for app launcher descriptions
- Change category from Music to AudioVideo for better categorization
- Add Keywords for improved searchability (audiophile, hifi, streaming)
- Enhance metainfo.xml with detailed feature list and links
- Configure AppImage bundle settings in tauri.conf.json
- Update workflows to generate improved .desktop files

AppImage now includes embedded icon via Tauri icon configuration.
App will now appear in Multimedia category with proper description in all Linux app launchers.
2026-01-20 21:03:07 -06:00
vicrodh 7a99ac6e92 feat: Force first track to be from seed artist/track in radio
Artist radio: Generate 20 tracks, find first from seed artist (distance 0), move to position 0
Track radio: Generate 20 tracks, find seed track itself, move to position 0
This ensures radio always starts with a relevant track
2026-01-20 20:51:51 -06:00
vicrodh b2c413b3fd Revert: Remove first track forcing logic
Keep only the weight and pool size improvements
2026-01-20 20:22:05 -06:00
vicrodh 9dcc23c478 fix: Correct track radio first track logic
Use RadioEngine selection for all tracks instead of manually prepending seed track
2026-01-20 20:19:38 -06:00
vicrodh 484c27417a feat: Improve radio algorithm to favor seed artist
- Increase weight for seed artist tracks from 3 to 6 (doubles probability)
- Reduce similar artists pool: 12 -> 8 artists, 40 -> 30 tracks per artist
- Force first track in artist radio to always be from the seed artist
- Force first track in track radio to always be the seed track itself
2026-01-20 20:16:37 -06:00
vicrodh 40eba46e60 fix: Resolve Radio Engine compilation errors
- Add Clone impl for QobuzClient to enable thread-safe usage
- Use spawn_blocking for RadioDb operations to avoid Send trait issues
- Fix track.hires type mismatch (bool vs Option<bool>)
- Compilation now succeeds with no errors
2026-01-20 17:59:56 -06:00
vicrodh 4bceda90c8 wip: Fix Radio Engine Tauri commands compilation errors
Still has Send trait issues due to RadioDb not being thread-safe
2026-01-20 17:51:17 -06:00
vicrodh ba4f7af909 feat: Add Radio context type to backend playback context system 2026-01-20 17:41:17 -06:00
vicrodh ed3a9cf8cb feat: Add Radio Engine Tauri commands for artist and track radio 2026-01-20 17:39:37 -06:00
vicrodh 4748cef7df chore: Bump version to 1.1.6-rc and add ARM64 workflow
- Update version to 1.1.6-rc for release candidate testing
- Add Linux ARM64/aarch64 build workflow
- Uses ubuntu-24.04-arm GitHub runner (free for public repos)
- Builds .deb, .rpm, .AppImage, and AUR tarball for ARM64
- Workflow isolated with continue-on-error to not block x86_64 builds
2026-01-20 16:04:35 -06:00
vicrodh f86bc826b8 test(radio): add spacing and long-run stability tests
cx
2026-01-20 15:07:32 -06:00
vicrodh baade9949c test(radio): add deterministic selection tests
cx
2026-01-20 15:07:09 -06:00
vicrodh b8d78a9003 feat(radio): expand pool with playlists and similar artists
cx
2026-01-20 15:06:39 -06:00
vicrodh 029e4a07df feat(radio): add pool builder and artist tracks endpoint
cx
2026-01-20 15:05:52 -06:00