suffix repeated disc titles with their disc number

When two discs of an album share a title, showing "Live" alone is
ambiguous, so render "Live: Disc 1"/"Live: Disc 2". Unique titles stay
as-is. Also drop the header from titleLarge to a semibold titleMedium so
longer titles fit on one line.
This commit is contained in:
austinried
2026-10-04 00:29:57 +00:00
parent 863c17be7d
commit 33e47e9654
2 changed files with 35 additions and 10 deletions
@@ -44,6 +44,16 @@ class AlbumDiscsTest {
assertEquals(0, nodesWithText("Disc 1"))
}
@Test
fun repeatedDiscTitlesGetTheDiscNumber() {
setContent(
listOf(song("s-a", disc = 1, track = 1), song("s-b", disc = 2, track = 1)),
discs = listOf(disc(1, "Live"), disc(2, "Live")),
)
assertEquals(1, nodesWithText("Live: Disc 1"))
assertEquals(1, nodesWithText("Live: Disc 2"))
}
@Test
fun discHeadersFallBackToTheDiscNumber() {
setContent(listOf(song("s-a", disc = 1, track = 1), song("s-b", disc = 2, track = 1)))