fix: section alignment, pagination, fav state, playback error handling
**Section toggles left-aligned** - Replace QToolButton with flat QPushButton for all section headers; QPushButton properly respects text-align: left in stylesheets **Pagination via "Load More" button** - QTreeWidget expands to fit all items so the scrollbar-based infinite scroll never triggered; replaced with an explicit "Load more…" button that appears when has_more is true and emits loadMoreRequested **Favourite button reflects actual state** - MainWindow preloads fav artist IDs on session restore (getFavArtists) and caches them in m_favArtistIds - ArtistView receives the full set via setFavArtistIds() and checks it on every setArtist() call so the button starts gold if already faved - Toggling updates the local cache immediately for back/forward nav **Playback error → queue advances** - player_loop now sets track_finished on Err (was only set on Ok(None)), so the toolbar's onTrackFinished handler advances to the next track instead of stalling on an unplayable track Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -215,6 +215,9 @@ fn player_loop(rx: std::sync::mpsc::Receiver<PlayerCommand>, status: PlayerStatu
|
||||
Err(e) => {
|
||||
eprintln!("playback error: {e}");
|
||||
*status.state.lock().unwrap() = PlayerState::Error(e.to_string());
|
||||
// Signal track end so the queue advances to the next track
|
||||
// instead of stalling on an unplayable track.
|
||||
status.track_finished.store(true, Ordering::SeqCst);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user