feat: Jam-Song zu den eigenen Lieblingssongs (Herz am laufenden Song) (1.8.0)

Co-Authored-By: Claude Opus 4.8 <[email protected]>
This commit is contained in:
2026-11-15 11:07:41 +01:00
co-authored by Claude Opus 4.8
parent e0dd61fbb4
commit 341155bc6b
9 changed files with 52 additions and 14 deletions
@@ -11,11 +11,12 @@ data class NowPlaying(
val playing: Boolean,
val positionMs: Long,
val durationMs: Long,
val likeStatus: String? = null,
) {
val hasTrack: Boolean get() = title.isNotBlank()
companion object {
val EMPTY = NowPlaying("", "", null, playing = false, positionMs = 0L, durationMs = 0L)
val EMPTY = NowPlaying("", "", null, playing = false, positionMs = 0L, durationMs = 0L, likeStatus = null)
private const val ARTIST_SEPARATOR = " • "
@@ -34,6 +35,7 @@ data class NowPlaying(
playing = json.optBoolean("playing", false),
positionMs = seconds(json.optDouble("currentTime", 0.0)),
durationMs = seconds(json.optDouble("duration", 0.0)),
likeStatus = json.optString("likeStatus").takeIf { it.isNotBlank() && it != "null" },
)
}