theme the artist header from cover art and tune the mini player

This commit is contained in:
austinried
2026-10-04 00:29:54 +00:00
parent 39e2c5d09e
commit d26936c251
8 changed files with 25 additions and 89 deletions
@@ -96,29 +96,4 @@ class SubsonicXmlTest {
assertEquals("sg1", entries[0].songId)
assertEquals(251L, SubsonicXml.song(1, document.getElementsByTagName("entry").item(0) as org.w3c.dom.Element).duration)
}
@Test
fun mapsArtistImageUrls() {
val document =
parse(
"""
<subsonic-response status="ok">
<artistInfo2>
<smallImageUrl>https://example.com/small.jpg</smallImageUrl>
<largeImageUrl>https://example.com/large.jpg</largeImageUrl>
</artistInfo2>
</subsonic-response>
""".trimIndent(),
)
assertEquals("https://example.com/large.jpg", SubsonicXml.artistImageUrl(document, thumbnail = false))
assertEquals("https://example.com/small.jpg", SubsonicXml.artistImageUrl(document, thumbnail = true))
}
@Test
fun artistImageUrlIsNullWhenAbsent() {
val document = parse("""<subsonic-response status="ok"><artistInfo2/></subsonic-response>""")
assertEquals(null, SubsonicXml.artistImageUrl(document, thumbnail = false))
}
}