feat(artist): minimal icon-only pin button + show all Deezer releases (Android)

- Pin ("Falscher Künstler?") is now a small icon-only ⚙ chip on both web
  and Android — accent-blue when pinned, subtle white otherwise; no more
  text banner over the hero.
- Android artist discography no longer filters to record_type=="album";
  it now shows albums, EPs AND singles (ordered albums→EPs→singles),
  matching Deezer's own artist page. Web already showed all.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
HoneyandClaude Opus 4.8 committed 2026-08-21 19:19:17 +02:00
1 parent 934253a036
commit 7b4599c50a
3 files changed
+14 -11

No files matched your search

@@ -64,12 +64,14 @@ object ItunesClient {
return album.tracks?.data.orEmpty().mapIndexed { i, t -> t.toAlbumTrackItem(album, i) }
}
/** A Deezer artist's real albums (not singles/EPs). */
/** A Deezer artist's full discography — albums, EPs AND singles, matching what Deezer's own
* artist page shows. Ordered albums → EPs → singles (Deezer returns newest-first within each). */
suspend fun lookupArtistAlbums(artistId: Long): List<ItunesItem> {
val albums: DzList<DzAlbum> = http.get("$BASE/artist/$artistId/albums") {
parameter("limit", 200)
}.body()
return albums.data.filter { it.record_type == "album" }.map { it.toItunesItem() }
val rank = { rt: String? -> when (rt) { "album" -> 0; "ep" -> 1; "single" -> 2; else -> 3 } }
return albums.data.sortedBy { rank(it.record_type) }.map { it.toItunesItem() }
}
/**
@@ -255,18 +255,18 @@ fun ArtistDetailScreen(
contentScale = ContentScale.Crop,
modifier = Modifier.fillMaxSize(),
)
// "Wrong artist?" pin — top-right over the hero.
// "Wrong artist?" pin — minimal icon-only chip, top-right over the hero.
Surface(
onClick = { vm.openPinPicker() },
shape = RoundedCornerShape(999.dp),
color = Color(0x66000000),
color = Color(0x59000000),
modifier = Modifier.align(Alignment.TopEnd).padding(10.dp),
) {
Text(
if (state.pin != null) "⚙ Gepinnt" else "⚙ Falscher Künstler?",
fontFamily = Outfit, fontSize = 12.sp, fontWeight = FontWeight.SemiBold,
color = Color.White.copy(0.92f),
modifier = Modifier.padding(horizontal = 12.dp, vertical = 7.dp),
"⚙",
fontSize = 14.sp,
color = if (state.pin != null) Color(0xFF7EB8FF) else Color.White.copy(0.72f),
modifier = Modifier.padding(horizontal = 8.dp, vertical = 6.dp),
)
}
Box(
+4 -3
View File
@@ -99,9 +99,10 @@ export async function loadArtistDetail(artist) {
hero.querySelector('.artist-pin-btn')?.remove();
const pinBtn = document.createElement('button');
pinBtn.className = 'artist-pin-btn';
pinBtn.textContent = _pin ? '⚙ Gepinnt' : '⚙ Falscher Künstler?';
pinBtn.title = 'Richtigen Deezer-Künstler wählen';
pinBtn.style.cssText = 'position:absolute;top:12px;right:12px;z-index:5;padding:5px 12px;border-radius:999px;border:1px solid rgba(255,255,255,.25);background:rgba(0,0,0,.45);color:#fff;font-family:var(--font);font-size:12px;font-weight:600;cursor:pointer;backdrop-filter:blur(4px)';
pinBtn.textContent = '⚙';
pinBtn.title = _pin ? 'Gepinnt — anderen Deezer-Künstler wählen' : 'Falscher Künstler? Richtigen Deezer-Künstler wählen';
// Minimal: a small, subtle icon-only chip in the corner (not a text banner).
pinBtn.style.cssText = `position:absolute;top:10px;right:10px;z-index:5;width:30px;height:30px;display:flex;align-items:center;justify-content:center;border-radius:999px;border:1px solid rgba(255,255,255,.16);background:rgba(0,0,0,.35);color:${_pin ? 'var(--accent)' : 'rgba(255,255,255,.72)'};font-size:14px;line-height:1;cursor:pointer;backdrop-filter:blur(4px)`;
pinBtn.onclick = () => openArtistPin(artist.id, artist.name);
hero.appendChild(pinBtn);
}