fix(ui): mini-player attributes track to its station

Radio subtitle is now 'artist · Station' so a track name never looks
like it contradicts the station shown in the list/hub.
This commit is contained in:
avi 2026-09-08 09:39:26 -05:00
commit eb32aed07c

View file

@ -72,9 +72,17 @@ fun NowPlayingBar(
subtitle = localMedia?.second.orEmpty() subtitle = localMedia?.second.orEmpty()
} else { } else {
val meta = streamMeta val meta = streamMeta
title = meta?.displayTitle?.takeIf { it.isNotEmpty() } ?: stationName val track = meta?.displayTitle?.takeIf { it.isNotEmpty() }
subtitle = if (meta != null && meta.displayTitle.isNotEmpty()) if (track != null) {
meta.displayArtist.ifEmpty { stationName } else "" // Radio playing a tagged track: track on top, "artist · Station"
// below so the track is always attributable to its station.
title = track
val artist = meta?.displayArtist.orEmpty()
subtitle = if (artist.isNotEmpty()) "$artist · $stationName" else stationName
} else {
title = stationName
subtitle = ""
}
} }
AnimatedVisibility( AnimatedVisibility(