Lots of fixes for artist detail page and track management

This commit is contained in:
Connor Johnstone
2026-03-18 13:44:49 -04:00
parent 2314346925
commit a268ec4e56
12 changed files with 889 additions and 80 deletions

View File

@@ -82,7 +82,7 @@ pub async fn search_track(query: &str, artist: Option<&str>, limit: u32) -> Resu
}
// --- Library ---
pub async fn list_artists(limit: u64, offset: u64) -> Result<Vec<Artist>, ApiError> {
pub async fn list_artists(limit: u64, offset: u64) -> Result<Vec<ArtistListItem>, ApiError> {
get_json(&format!("{BASE}/artists?limit={limit}&offset={offset}")).await
}
@@ -90,8 +90,16 @@ pub async fn get_artist(id: i32) -> Result<ArtistDetail, ApiError> {
get_json(&format!("{BASE}/artists/{id}")).await
}
pub async fn get_album(id: i32) -> Result<AlbumDetail, ApiError> {
get_json(&format!("{BASE}/albums/{id}")).await
pub async fn get_artist_full(id: &str) -> Result<FullArtistDetail, ApiError> {
get_json(&format!("{BASE}/artists/{id}/full")).await
}
pub async fn get_artist_full_quick(id: &str) -> Result<FullArtistDetail, ApiError> {
get_json(&format!("{BASE}/artists/{id}/full?quick=true")).await
}
pub async fn get_album(mbid: &str) -> Result<MbAlbumDetail, ApiError> {
get_json(&format!("{BASE}/albums/{mbid}")).await
}
pub async fn list_tracks(limit: u64, offset: u64) -> Result<Vec<Track>, ApiError> {