mirror of
https://github.com/Suwayomi/Suwayomi-Server.git
synced 2026-07-01 01:44:34 -05:00
Add ability to select what to sync
This commit is contained in:
@@ -1037,6 +1037,40 @@ class ServerConfig(
|
||||
privacySafe = false,
|
||||
)
|
||||
|
||||
val syncDataManga: MutableStateFlow<Boolean> by BooleanSetting(
|
||||
protoNumber = 89,
|
||||
defaultValue = true,
|
||||
group = SettingGroup.SYNCYOMI,
|
||||
privacySafe = true,
|
||||
)
|
||||
|
||||
val syncDataChapters: MutableStateFlow<Boolean> by BooleanSetting(
|
||||
protoNumber = 90,
|
||||
defaultValue = true,
|
||||
group = SettingGroup.SYNCYOMI,
|
||||
privacySafe = true,
|
||||
)
|
||||
|
||||
val syncDataTracking: MutableStateFlow<Boolean> by BooleanSetting(
|
||||
protoNumber = 91,
|
||||
defaultValue = true,
|
||||
group = SettingGroup.SYNCYOMI,
|
||||
privacySafe = true,
|
||||
)
|
||||
|
||||
val syncDataHistory: MutableStateFlow<Boolean> by BooleanSetting(
|
||||
protoNumber = 92,
|
||||
defaultValue = true,
|
||||
group = SettingGroup.SYNCYOMI,
|
||||
privacySafe = true,
|
||||
)
|
||||
|
||||
val syncDataCategories: MutableStateFlow<Boolean> by BooleanSetting(
|
||||
protoNumber = 93,
|
||||
defaultValue = true,
|
||||
group = SettingGroup.SYNCYOMI,
|
||||
privacySafe = true,
|
||||
)
|
||||
|
||||
/** ****************************************************************** **/
|
||||
/** **/
|
||||
|
||||
@@ -24,6 +24,7 @@ import suwayomi.tachidesk.manga.model.table.ChapterTable
|
||||
import suwayomi.tachidesk.manga.model.table.MangaStatus
|
||||
import suwayomi.tachidesk.manga.model.table.MangaTable
|
||||
import suwayomi.tachidesk.manga.model.table.toDataClass
|
||||
import suwayomi.tachidesk.server.serverConfig
|
||||
import uy.kohesive.injekt.Injekt
|
||||
import uy.kohesive.injekt.api.get
|
||||
import java.util.Date
|
||||
@@ -51,11 +52,11 @@ object SyncManager {
|
||||
val databaseManga = getAllMangaThatNeedsSync()
|
||||
|
||||
val backupFlags = BackupFlags(
|
||||
includeManga = true,
|
||||
includeCategories = true,
|
||||
includeChapters = true,
|
||||
includeTracking = true,
|
||||
includeHistory = true,
|
||||
includeManga = serverConfig.syncDataManga.value,
|
||||
includeCategories = serverConfig.syncDataCategories.value,
|
||||
includeChapters = serverConfig.syncDataChapters.value,
|
||||
includeTracking = serverConfig.syncDataTracking.value,
|
||||
includeHistory = serverConfig.syncDataHistory.value,
|
||||
includeClientData = false,
|
||||
includeServerSettings = false,
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user