mirror of
https://github.com/Suwayomi/Suwayomi-Server.git
synced 2026-07-02 10:24:35 -05:00
Add ability to select what to sync
This commit is contained in:
@@ -1037,6 +1037,40 @@ class ServerConfig(
|
|||||||
privacySafe = false,
|
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.MangaStatus
|
||||||
import suwayomi.tachidesk.manga.model.table.MangaTable
|
import suwayomi.tachidesk.manga.model.table.MangaTable
|
||||||
import suwayomi.tachidesk.manga.model.table.toDataClass
|
import suwayomi.tachidesk.manga.model.table.toDataClass
|
||||||
|
import suwayomi.tachidesk.server.serverConfig
|
||||||
import uy.kohesive.injekt.Injekt
|
import uy.kohesive.injekt.Injekt
|
||||||
import uy.kohesive.injekt.api.get
|
import uy.kohesive.injekt.api.get
|
||||||
import java.util.Date
|
import java.util.Date
|
||||||
@@ -51,11 +52,11 @@ object SyncManager {
|
|||||||
val databaseManga = getAllMangaThatNeedsSync()
|
val databaseManga = getAllMangaThatNeedsSync()
|
||||||
|
|
||||||
val backupFlags = BackupFlags(
|
val backupFlags = BackupFlags(
|
||||||
includeManga = true,
|
includeManga = serverConfig.syncDataManga.value,
|
||||||
includeCategories = true,
|
includeCategories = serverConfig.syncDataCategories.value,
|
||||||
includeChapters = true,
|
includeChapters = serverConfig.syncDataChapters.value,
|
||||||
includeTracking = true,
|
includeTracking = serverConfig.syncDataTracking.value,
|
||||||
includeHistory = true,
|
includeHistory = serverConfig.syncDataHistory.value,
|
||||||
includeClientData = false,
|
includeClientData = false,
|
||||||
includeServerSettings = false,
|
includeServerSettings = false,
|
||||||
)
|
)
|
||||||
|
|||||||
Reference in New Issue
Block a user