mirror of
https://github.com/austinried/subtracks.git
synced 2026-11-11 07:29:14 +01:00
address review: mark the fetch bound test-only; fix the concurrency test
- The concurrency bound already existed; this parameter only exists so tests can force the sequential path, and no production path passes it. Mark it `@VisibleForTesting` so that is explicit rather than reading as a wired setting. - `playlistSongsUseTheSameRowsAtAnyFetchBound` could not fail (bound has no effect on the rows) — delete it and its `normalized` helper. - `playlistSongsRespectsASmallerFetchBound` relied on a 300ms overlap window; use latches so the bound is proven deterministically (fails when the semaphore ignores the bound).
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
package com.subtracks.data.source.subsonic
|
||||
|
||||
import androidx.annotation.VisibleForTesting
|
||||
import com.subtracks.data.model.Album
|
||||
import com.subtracks.data.model.Artist
|
||||
import com.subtracks.data.model.Playlist
|
||||
@@ -34,6 +35,7 @@ class SubsonicSource(
|
||||
private val maxBitrate: Int = 0,
|
||||
private val streamFormat: String? = null,
|
||||
private val maxPages: Int = MAX_PAGES,
|
||||
@VisibleForTesting(otherwise = VisibleForTesting.PRIVATE)
|
||||
private val maxConcurrentFetches: Int = MAX_CONCURRENT_FETCHES,
|
||||
) : MusicSource {
|
||||
private var emptyQuerySearchSupported: Boolean? = null
|
||||
|
||||
Reference in New Issue
Block a user