mirror of
https://github.com/InsanusMokrassar/SauceNaoAPI.git
synced 2025-09-16 13:39:18 +00:00
fix deprecations
This commit is contained in:
@@ -158,7 +158,7 @@ data class SauceNaoAPI(
|
|||||||
minSimilarity: Float? = null
|
minSimilarity: Float? = null
|
||||||
): SauceNaoAnswer? {
|
): SauceNaoAnswer? {
|
||||||
return suspendCoroutine<SauceNaoAnswer> {
|
return suspendCoroutine<SauceNaoAnswer> {
|
||||||
requestsChannel.offer(
|
requestsChannel.trySend(
|
||||||
it to HttpRequestBuilder().apply {
|
it to HttpRequestBuilder().apply {
|
||||||
url(searchUrl)
|
url(searchUrl)
|
||||||
|
|
||||||
@@ -212,4 +212,4 @@ data class SauceNaoAPI(
|
|||||||
timeManager.close()
|
timeManager.close()
|
||||||
quotaManager.close()
|
quotaManager.close()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -92,7 +92,7 @@ internal class RequestQuotaManager (
|
|||||||
quotaActions.send(callback)
|
quotaActions.send(callback)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
quotaActions.offer(callback)
|
quotaActions.trySend(callback)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -84,7 +84,7 @@ internal class TimeManager(
|
|||||||
|
|
||||||
suspend fun getMostOldestInLongPeriod(): DateTime? {
|
suspend fun getMostOldestInLongPeriod(): DateTime? {
|
||||||
return suspendCoroutine {
|
return suspendCoroutine {
|
||||||
actionsChannel.offer(
|
actionsChannel.trySend(
|
||||||
TimeManagerMostOldestInLongGetter(it)
|
TimeManagerMostOldestInLongGetter(it)
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
@@ -92,7 +92,7 @@ internal class TimeManager(
|
|||||||
|
|
||||||
suspend fun getMostOldestInShortPeriod(): DateTime? {
|
suspend fun getMostOldestInShortPeriod(): DateTime? {
|
||||||
return suspendCoroutine {
|
return suspendCoroutine {
|
||||||
actionsChannel.offer(TimeManagerMostOldestInShortGetter(it))
|
actionsChannel.trySend(TimeManagerMostOldestInShortGetter(it))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user