mirror of
https://github.com/austinried/subtracks.git
synced 2026-11-10 23:21:59 +01:00
address review: drop the dead disc query, pin the fetch bound, cover multi-page disc prune
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user