M464 loudness leveling (steps 4–8), APK distribution and security baseline adoptions #136
@@ -64,7 +64,7 @@ class ReplayGainStore internal constructor(
|
|||||||
fun request(trackIds: Collection<String>) {
|
fun request(trackIds: Collection<String>) {
|
||||||
val now = clock()
|
val now = clock()
|
||||||
val wanted = trackIds.filter { id ->
|
val wanted = trackIds.filter { id ->
|
||||||
id !in gains &&
|
!gains.containsKey(id) &&
|
||||||
(missedAt[id]?.let { now - it > MISS_RETRY_MS } ?: true) &&
|
(missedAt[id]?.let { now - it > MISS_RETRY_MS } ?: true) &&
|
||||||
inflight.add(id)
|
inflight.add(id)
|
||||||
}
|
}
|
||||||
@@ -80,7 +80,7 @@ class ReplayGainStore internal constructor(
|
|||||||
|
|
||||||
internal suspend fun load(ids: List<String>) {
|
internal suspend fun load(ids: List<String>) {
|
||||||
fromCache(ids)
|
fromCache(ids)
|
||||||
val rest = ids.filter { it !in gains }
|
val rest = ids.filter { !gains.containsKey(it) }
|
||||||
val health = serverHealth()
|
val health = serverHealth()
|
||||||
if (rest.isEmpty() || health == ServerHealth.Offline || health == ServerHealth.ServerDown) return
|
if (rest.isEmpty() || health == ServerHealth.Offline || health == ServerHealth.ServerDown) return
|
||||||
for (batch in rest.chunked(MAX_IDS_PER_REQUEST)) {
|
for (batch in rest.chunked(MAX_IDS_PER_REQUEST)) {
|
||||||
|
|||||||
Reference in New Issue
Block a user