music: reformat

This commit is contained in:
Alexander Capehart
2026-01-03 17:49:05 -07:00
parent 5fcc1537ba
commit dd4b9f152e
2 changed files with 4 additions and 7 deletions
@@ -62,17 +62,13 @@ sealed interface MediaSessionUID {
if (str.length < 3) { if (str.length < 3) {
return null return null
} }
return Tab( return Tab(TabNode.fromString(str.substring(2 until str.length)) ?: return null)
TabNode.fromString(str.substring(2 until str.length))
?: return null)
} }
if (str.startsWith("mi")) { if (str.startsWith("mi")) {
if (str.length < 3) { if (str.length < 3) {
return null return null
} }
return SingleItem( return SingleItem(UID.fromString(str.substring(2 until str.length)) ?: return null)
UID.fromString(str.substring(2 until str.length)) ?: return null
)
} }
val parts = str.split(":", limit = 2) val parts = str.split(":", limit = 2)
if (parts.size != 2) { if (parts.size != 2) {
@@ -47,7 +47,8 @@ sealed class TabNode {
data class Home(val type: MusicType) : TabNode() { data class Home(val type: MusicType) : TabNode() {
override val id = "$ID/${type.intCode}" override val id = "$ID/${type.intCode}"
override val microId: String = "t{${ override val microId: String =
"t{${
when (type) { when (type) {
MusicType.SONGS -> 's' MusicType.SONGS -> 's'
MusicType.ALBUMS -> 'a' MusicType.ALBUMS -> 'a'