mirror of
https://github.com/Suwayomi/Suwayomi-Server.git
synced 2026-07-14 08:14:34 -05:00
Address Build Warnings and Cleanup (#707)
* Address build warnings and cleanup * Actual name of who defined the protocol * Remove uneeded detekt supression * GraphQL Before-After cleanup * Lint * Cleanup unused functions * Fix some discrepancies with the 1.5 source api and fix lang exception
This commit is contained in:
@@ -13,6 +13,7 @@ import io.javalin.websocket.WsContext
|
||||
import io.javalin.websocket.WsMessageContext
|
||||
import kotlinx.coroutines.CoroutineScope
|
||||
import kotlinx.coroutines.Dispatchers
|
||||
import kotlinx.coroutines.FlowPreview
|
||||
import kotlinx.coroutines.SupervisorJob
|
||||
import kotlinx.coroutines.async
|
||||
import kotlinx.coroutines.awaitAll
|
||||
@@ -51,6 +52,7 @@ import kotlin.time.Duration.Companion.seconds
|
||||
|
||||
private val logger = KotlinLogging.logger {}
|
||||
|
||||
@OptIn(FlowPreview::class)
|
||||
object DownloadManager {
|
||||
private val scope = CoroutineScope(SupervisorJob() + Dispatchers.Default)
|
||||
private val clients = ConcurrentHashMap<String, WsContext>()
|
||||
@@ -150,9 +152,6 @@ object DownloadManager {
|
||||
if (immediate) {
|
||||
sendStatusToAllClients()
|
||||
}
|
||||
/*if (downloadChapter != null) { TODO GRAPHQL
|
||||
downloadSubscriptionSource.publish(downloadChapter)
|
||||
}*/
|
||||
}
|
||||
|
||||
private fun getStatus(): DownloadStatus {
|
||||
|
||||
@@ -12,6 +12,7 @@ fun interface FileDownload0Args : FileDownload {
|
||||
}
|
||||
}
|
||||
|
||||
@Suppress("UNCHECKED_CAST")
|
||||
fun interface FileDownload3Args<A, B, C> : FileDownload {
|
||||
suspend fun execute(
|
||||
a: A,
|
||||
|
||||
@@ -14,6 +14,7 @@ fun interface RetrieveFile0Args : RetrieveFile {
|
||||
}
|
||||
}
|
||||
|
||||
@Suppress("UNCHECKED_CAST")
|
||||
fun interface RetrieveFile1Args<A> : RetrieveFile {
|
||||
fun execute(a: A): Pair<InputStream, String>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user