feat(suggestions): major UX overhaul with popular tracks fallback

Backend:
- Add get_artist_tracks command for fetching artist's popular tracks

Frontend:
- Fallback to artist's popular tracks when tracks_appears_on is sparse
- Remove card hover movement, only image moves up on hover
- Add hover overlay with (add to queue) (play) (play next) buttons
- Use playlist.svg icon for playlist cards and glyph
- Radio glyph shown by default, replaced by action buttons on hover
- Fix icon sizes: QBZ (22px) vs Qobuz (18px) for visual balance
- Track playlist.svg asset
This commit is contained in:
vicrodh committed 2026-01-31 14:48:26 -06:00
1 parent d7c0af6297
commit 14f0cae1c1
4 files changed
+283 -161

No files matched your search

+23 -1
View File
@@ -2,7 +2,7 @@
use tauri::State;
use crate::api::{Album, Artist, ArtistAlbums, LabelDetail, SearchResultsPage, Track};
use crate::api::{Album, Artist, ArtistAlbums, LabelDetail, SearchResultsPage, Track, TracksContainer};
use crate::api_cache::ApiCacheState;
use crate::AppState;
use serde::{Deserialize, Serialize};
@@ -222,6 +222,28 @@ pub async fn get_artist_detail(
.map_err(|e| e.to_string())
}
/// Get artist's popular/top tracks
#[tauri::command]
pub async fn get_artist_tracks(
artist_id: u64,
limit: Option<u32>,
offset: Option<u32>,
state: State<'_, AppState>,
) -> Result<TracksContainer, String> {
log::info!(
"Command: get_artist_tracks {} limit={:?} offset={:?}",
artist_id,
limit,
offset
);
let client = state.client.lock().await;
client
.get_artist_tracks(artist_id, limit.unwrap_or(50), offset.unwrap_or(0))
.await
.map_err(|e| e.to_string())
}
/// Get artist albums with pagination (for load more)
#[tauri::command]
pub async fn get_artist_albums(
+1
View File
@@ -478,6 +478,7 @@ pub fn run() {
commands::get_track,
commands::get_artist,
commands::get_artist_detail,
commands::get_artist_tracks,
commands::get_artist_albums,
commands::get_similar_artists,
commands::get_label,