- Add cast_get_position command for Chromecast media position
- Add CastPositionInfo struct with position, duration, player_state, idle_reason
- Extend position polling to work with both DLNA and Chromecast
- Detect track end on Chromecast via IDLE state with FINISHED reason
- Unify polling logic for both protocols
cpvsc
- Add onCastDisconnected callback to castStore
- Reset isPlaying state when cast disconnects
- Ensures play indicator stops in UI when DLNA disconnects
cpvsc
- Add cast-aware badge that shows protocol name (DLNA/CAST/AIR)
- Show protocol-specific SVG icons in tooltip (dlna.svg, cast_audio.svg)
- Hide DAC passthrough and exclusive mode badges when casting
- Stop hardware polling when casting to avoid misleading info
- Add purple theme styling for cast badge consistent with cast UI
cpvsc
DLNA POSITION TRACKING:
- Added GetPositionInfo SOAP action to query current playback position
- Added GetTransportInfo SOAP action to get transport state (PLAYING/PAUSED/STOPPED)
- New dlna_get_position command returns position, duration, and transport state
- Added parse_time_string() helper for HH:MM:SS format
FRONTEND INTEGRATION:
- castStore: Added position polling (1s interval) when connected to DLNA
- castStore: New getCastPosition() for UI components
- castStore: Automatic polling start/stop on track play/disconnect
- playerStore: Subscribes to castStore for position updates
- playerStore: Updates currentTime from cast position when casting
This enables the seekbar to display accurate position during DLNA playback.
Seek functionality was already implemented (dlna_seek command).
Files modified:
- src-tauri/src/cast/dlna/device.rs
- src-tauri/src/cast/dlna/commands.rs
- src-tauri/src/cast/dlna/mod.rs
- src-tauri/src/lib.rs
- src/lib/stores/castStore.ts
- src/lib/stores/playerStore.ts
PROBLEM:
- DLNA device detection and connection worked
- Audio playback on DLNA devices did not work
ROOT CAUSE:
- DIDL-Lite metadata had hardcoded protocolInfo='audio/flac'
- Many DLNA devices silently reject content when protocolInfo
doesn't match the actual MIME type
- No debug logging to diagnose SOAP action failures
FIX:
- Pass actual content_type from Qobuz stream to DIDL builder
- Generate protocolInfo dynamically based on real MIME type
- Add extensive debug logging for:
- MediaServer URL generated
- Content-Type from Qobuz
- Complete DIDL-Lite metadata
- SOAP action responses (SetAVTransportURI, Play)
- Error details when actions fail
Files modified:
- src-tauri/src/cast/dlna/device.rs
- src-tauri/src/cast/dlna/commands.rs
Changes the menu action label from "Play later" to "Add to queue"
for better clarity and consistency with standard music player UX.
Updated in:
- AlbumMenu.svelte
- TrackMenu.svelte
- ArtistDetailView.svelte (tracks context menu)
Relates to #21
The previous logic checked total album count (< 10) to decide whether
to compare "X" vs "The X" variants. This failed for artists like
"Traveling Wilburys" (19 total albums, but 0 studio albums).
Now we:
1. Always count studio albums for the initial match
2. If studio albums < 10, search for "The X" variant
3. Compare studio album counts
Example fix:
- "Traveling Wilburys": 19 total, 0 studio albums
- "The Traveling Wilburys": 17 total, 6 studio albums
- Now correctly prefers "The Traveling Wilburys"
When comparing "X" vs "The X" variants, now fetches actual albums
and counts only studio albums (main discography) instead of total
album count. This filters out:
- Tributes (albums by other artists)
- Compilations (greatest hits, best of)
- Unofficial releases (bootlegs, broadcasts)
- Live albums
- EPs and singles
Uses the same categorization logic as the frontend (qobuzAdapters.ts).
This provides cleaner matching, e.g., "The Beatles" with 200+ studio
albums vs "Beatles" tribute compilation with 2 albums.
MusicBrainz often returns names without "The" prefix (e.g., "Beatles",
"Traveling Wilburys") but Qobuz has both variants, with the prefixed
version being the legitimate artist.
New matching logic:
1. Search for exact name match first
2. If no exact match, check for "The X" variant in results
3. If match has <5 albums, search for "The X" specifically and compare
4. Prefer the variant with more albums (likely the real artist)
This fixes navigation to "The Beatles", "The Traveling Wilburys", etc.
Show "Looking up {name}..." toast when clicking on musician links
to provide feedback while the backend resolves the musician.
Also show error toast if lookup fails.
Groups/bands in the sidebar now use the musician resolution flow.
Since bands typically have Qobuz artist pages, they resolve as
confidence=3 (Confirmed) and navigate directly to the artist page.
Wire up onMusicianClick for Members & Former and Collaborators
sections in ArtistDetailView sidebar. Clicking a member now triggers
the musician resolution flow (modal for weak confidence, musician
page for contextual, or artist page for confirmed).
Uses the first role from MusicBrainz relationships or defaults to
"Band Member" / "Collaborator" as the role parameter.
AlbumSummary only has id, title, image, and label fields.
The code was incorrectly trying to access artist and
release_date_original which only exist on the full Album struct.
- Use track.performer for artist_name instead of album.artist
- Set year to None since AlbumSummary doesn't have release_date
- Fix image access since ImageSet is direct field, not Option
- Fix title access since String is direct field, not Option
AlbumCreditsModal:
- Add onMusicianClick prop
- Update handlePerformerClick to pass name and role
- Falls back to onPerformerSearch if onMusicianClick not provided
TrackInfoModal:
- Add onMusicianClick prop
- Add handlePerformerClick function
- Pass role from groupedCredits to handler
+page.svelte:
- Pass handleMusicianClick to both modals
Full page view for musicians with confidence level 2 (Contextual):
- Header with musician name, role, and avatar
- Bands & Projects section (from MusicBrainz)
- Appears On section with album grid (Qobuz only)
- Pagination with Load More button
- Album cards with artwork, title, artist, year, and role badge
- Click album to navigate to album detail
Informational modal for musicians with confidence level 0-1:
- Shows musician name and primary role
- Lists known bands/projects (from MusicBrainz)
- Displays explanatory copy based on confidence
- Provides CTA to Artist Page if applicable
- Does NOT show albums, tracks, or deep navigation
- Closes on Escape key or backdrop click
- Add mbAvailable state to track MusicBrainz availability
- Set mbAvailable=false when MB is disabled or API fails
- Wrap entire Relationships section with {#if mbAvailable}
- Only extract labels from albums categorized as 'albums' (Discography)
- Excludes EPs, live albums, compilations, tributes, and others
- Change icon from Tag to Disc (record label, not tag)
- Add labels field to ArtistDetail type
- Extract unique labels from artist albums in convertQobuzArtist
- Update appendArtistAlbums to merge new labels
- Display labels in sidebar with click navigation to label view
- Use Tag icon from lucide-svelte
- Remove ended visual distinction (all members same style)
- Match Lyrics sidebar dimensions (340px, same height)
- Update header structure to match Lyrics
- Use element-connect.svg icon
- Equal spacing between items in all sections
cc
- All band members go to single 'Members' list
- Show ended status with muted color
- Tooltip shows roles + period (e.g. 'guitar (1981 - 2003)')
- Remove separate 'Former Members' section
cc
- Deduplicate members that appear multiple times with different roles
- Combine roles and show in mouseover tooltip
- Apply to Members, Former Members, Member Of, Collaborators
cc
- Members: current band members
- Former Members: past members (with muted style)
- Member Of: groups artist belongs to
- Collaborators: collaboration relationships
cc
- Fixed position sidebar that slides in from right
- Labels section (placeholder)
- Similar Artists section (functional)
- MusicBrainz Relationships section (functional)
cc
The playback thread was terminating on pause instead of waiting.
Now uses two separate flags:
- is_playing: controls pause/resume (thread waits when false)
- should_stop: controls full termination (thread exits when true)
This allows the ALSA Direct playback thread to pause and resume
without losing its position or requiring a full restart.
Bit-perfect audio path remains unchanged - only control flow modified.
- Pass track duration from frontend to streaming playback for seekbar
- Add StreamInfo struct with speed measurement during probe
- Implement StreamingConfig::from_speed_mbps() for adaptive buffer sizing
- Add play_streaming_dynamic() method using speed-based buffer config
- Enhanced download logging with progress %, speed (current/avg), and ETA
- Auto-cache streamed tracks for instant replay
The seekbar now shows playback progress during streaming by using
the track's known duration from metadata rather than detecting it
from incomplete audio data.
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
- Add genre field to QobuzTrack.album type
- Add genre to compilation albums in qobuzAdapters
- Add getGenreLabel function to LabelView
- Add genre prop to AlbumDetailView artist albums
- Update +page.svelte artist albums mapping to include genre
- 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
- 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
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
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)
- 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
- 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
Display MusicBrainz artist relationships on artist detail page:
- Band Members section with role info (for groups)
- Past Members section (former members)
- Member Of section (groups this artist belongs to)
Features:
- Automatic MusicBrainz artist resolution on page load
- Click to navigate to related artist's Qobuz page
- Graceful degradation when data unavailable
- Respects MusicBrainz enabled setting
Uses Stage 1 MusicBrainz infrastructure for data fetching.
cc
Add automatic ListenBrainz scrobbling when tracks play:
- Now-playing submission on track start
- Scrobble after 50% or 4min (whichever is shorter)
- MusicBrainz data enrichment for enhanced scrobbles
- Offline queue support (flush when back online)
- ISRC field added to PlayingTrack interface
Scrobbling uses Stage 1 MusicBrainz resolution to include:
- Recording MBID
- Release MBID
- Artist MBIDs
cc
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
- 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
Simplified the lossy format detection since only MP3 is clearly lossy
among supported library formats (flac, m4a, wav, aiff, ape, mp3).
m4a can be either ALAC (lossless) or AAC (lossy) so it's not reliable.
- Removed LOSSY_FORMATS array, now only checks for 'mp3'
- Use /mp3.svg icon (text-only, more readable than mp3-cd.svg)
- Simplified tier to just 'mp3' instead of 'mp3-cd' and 'lossy'
MP3 and other lossy formats (aac, m4a, ogg, opus, wma) at CD-like
sample rates (44.1-48kHz) were incorrectly shown as "CD" quality
because bitDepth check came before format check.
Changes:
- Add format prop to QualityBadge, NowPlayingBar, ExpandedPlayer
- Add format field to PlayingTrack interface
- Check for lossy formats BEFORE checking bitDepth/samplingRate
- New 'mp3-cd' tier for lossy formats at CD sample rates
- Uses /mp3-cd.svg icon for this tier
- Add folder popover for collapsed sidebar mode - clicking a folder
button now shows a menu with the playlists inside instead of silently
toggling the expansion state
- Fix folder button color to match other nav items (--text-muted)
- Fix folder button size to match nav items (32px height instead of 40px)
- Add overflow-x: hidden to playlists-scroll to prevent horizontal scroll
Filter panel now auto-closes after 3 seconds of inactivity and when
clicking outside. Added album sorting with three options:
- Album Name (A-Z, Z-A)
- Release Year (ascending, descending)
- Artist Name (A-Z, Z-A)
Sort selection persists within the session and secondary sort by
title is applied when primary sort values match.
- Use size="large" (180px) for all AlbumCard instances
- Change album grids from CSS grid with 1fr to flexbox
- Fix LocalLibrary gap issue by using consistent spacing
- Align VirtualizedAlbumList, ArtistDetailView, SearchView,
FavoritesView, HomeView, and AlbumDetailView
Keep the onPerformerSearch infrastructure in TrackInfoModal and
AlbumCreditsModal but don't pass the prop. Performer names are
now plain text. Re-enable when MusicBrainz allows precise lookups.
Also fixes: sticky tabs in AlbumCreditsModal now work correctly.
Phase 7 quick wins (closes#17):
- Performer names in TrackInfoModal are now clickable
- Clicking a performer searches for their name in Qobuz
- SearchView auto-searches when opened with pre-filled query
- Credits/Review tabs in AlbumCreditsModal stay fixed when scrolling