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:
@@ -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" },
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user