library: route the rediscover list through the download-free query too

Also assert the default pager still observes album writes and cover the
quoted-search path.
This commit is contained in:
austinried
2026-10-04 00:30:07 +00:00
parent c2acbd0eae
commit ea74fce758
5 changed files with 48 additions and 24 deletions
@@ -675,6 +675,10 @@ class LibraryDaoTest {
)
assertEquals(listOf("Say \"Hello\""), dao.albumsByName(sourceId, 0, "\"Hel").page().map { it.name })
assertEquals(
listOf("Say \"Hello\""),
dao.albumsPaging(albumsDefaultQuery(sourceId, 0, "\"Hel", AlbumSort.Name, false)).page().map { it.name },
)
}
@Test
@@ -817,6 +821,9 @@ class LibraryDaoTest {
awaitUntil("the downloaded list observes download writes") { downloadedInvalidated.get() }
assertFalse("the default list must not observe download writes", defaultInvalidated.get())
dao.upsertAlbums(listOf(album(sourceId, "a", "Renamed", year = null, starred = null)))
awaitUntil("the default list observes album writes") { defaultInvalidated.get() }
}
private suspend fun source(): Long =
@@ -371,7 +371,7 @@ class LibraryHomeDaoTest {
assertEquals(
listOf("Older", "Old"),
dao.albumsByRediscover(sourceId, starredFilter = 0, search = "", cutoff = 500).page().map { it.name },
dao.albumsPaging(rediscoverAlbumsQuery(sourceId, starredFilter = 0, search = "", cutoff = 500)).page().map { it.name },
)
}