address review: drop the dead disc query, pin the fetch bound, cover multi-page disc prune

This commit is contained in:
austinried
2026-10-04 00:29:59 +00:00
parent 34f15176d7
commit 0fb2ce2918
4 changed files with 38 additions and 6 deletions
@@ -82,9 +82,6 @@ interface LibraryDao {
limit: Int,
): List<String>
@Query("SELECT albumId, disc FROM discs WHERE sourceId = :sourceId")
suspend fun discKeys(sourceId: Long): List<DiscKey>
@Query(
"SELECT albumId, disc FROM discs WHERE sourceId = :sourceId " +
"AND (albumId > :afterAlbumId OR (albumId = :afterAlbumId AND disc > :afterDisc)) " +
@@ -282,11 +282,12 @@ class SubsonicSource(
private companion object {
const val PAGE_SIZE = 500
const val MAX_PAGES = 20_000
const val MAX_CONCURRENT_FETCHES = 4
const val THUMBNAIL_SIZE = 256
}
}
internal const val MAX_CONCURRENT_FETCHES = 4
private class PageCapExceeded(
message: String,
) : SubsonicException(-1, message)