mirror of
https://github.com/Suwayomi/Suwayomi-Server.git
synced 2026-07-11 23:04:33 -05:00
Subscriptions!
This commit is contained in:
@@ -24,6 +24,7 @@ import mu.KotlinLogging
|
||||
import org.jetbrains.exposed.sql.and
|
||||
import org.jetbrains.exposed.sql.select
|
||||
import org.jetbrains.exposed.sql.transactions.transaction
|
||||
import suwayomi.tachidesk.graphql.subscriptions.downloadSubscriptionSource
|
||||
import suwayomi.tachidesk.manga.impl.download.model.DownloadChapter
|
||||
import suwayomi.tachidesk.manga.impl.download.model.DownloadState.Downloading
|
||||
import suwayomi.tachidesk.manga.impl.download.model.DownloadStatus
|
||||
@@ -100,6 +101,9 @@ object DownloadManager {
|
||||
notifyFlow.emit(Unit)
|
||||
}
|
||||
}
|
||||
/*if (downloadChapter != null) { TODO GRAPHQL
|
||||
downloadSubscriptionSource.publish(downloadChapter)
|
||||
}*/
|
||||
}
|
||||
|
||||
private fun getStatus(): DownloadStatus {
|
||||
@@ -234,6 +238,7 @@ object DownloadManager {
|
||||
manga
|
||||
)
|
||||
downloadQueue.add(downloadChapter)
|
||||
downloadSubscriptionSource.publish(downloadChapter)
|
||||
logger.debug { "Added chapter ${chapter.id} to download queue (${manga.title} | ${chapter.name})" }
|
||||
return downloadChapter
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user