Conversation
|
Any update? |
|
If you check the commits tab you will see there have been many updates. This is progressing at a good pace, hopefully it will be ready soon. |
|
I don't use sync triggers and I'm too lazy to implement them so I'm marking the PR as ready. |
server/src/main/kotlin/suwayomi/tachidesk/global/impl/sync/SyncManager.kt
Show resolved
Hide resolved
server/src/main/kotlin/suwayomi/tachidesk/global/impl/sync/SyncManager.kt
Outdated
Show resolved
Hide resolved
server/src/main/kotlin/suwayomi/tachidesk/global/impl/sync/SyncManager.kt
Outdated
Show resolved
Hide resolved
server/src/main/kotlin/suwayomi/tachidesk/global/impl/sync/SyncManager.kt
Outdated
Show resolved
Hide resolved
server/src/main/kotlin/suwayomi/tachidesk/global/impl/sync/SyncManager.kt
Outdated
Show resolved
Hide resolved
server/src/main/kotlin/suwayomi/tachidesk/global/impl/sync/SyncYomiSyncService.kt
Outdated
Show resolved
Hide resolved
server/src/main/kotlin/suwayomi/tachidesk/global/impl/sync/SyncYomiSyncService.kt
Outdated
Show resolved
Hide resolved
server/src/main/kotlin/suwayomi/tachidesk/global/impl/sync/SyncYomiSyncService.kt
Outdated
Show resolved
Hide resolved
server/src/main/kotlin/suwayomi/tachidesk/global/impl/sync/SyncYomiSyncService.kt
Outdated
Show resolved
Hide resolved
server/src/main/kotlin/suwayomi/tachidesk/global/impl/sync/SyncYomiSyncService.kt
Outdated
Show resolved
Hide resolved
- Move entire sync operation into a single transaction - Stop loading all manga to memory
server/src/main/kotlin/suwayomi/tachidesk/manga/impl/update/Updater.kt
Outdated
Show resolved
Hide resolved
server/src/main/kotlin/suwayomi/tachidesk/global/impl/sync/SyncManager.kt
Outdated
Show resolved
Hide resolved
This reverts commit bee8d21.
server/src/main/kotlin/suwayomi/tachidesk/global/impl/sync/SyncYomiSyncService.kt
Outdated
Show resolved
Hide resolved
server/src/main/kotlin/suwayomi/tachidesk/global/impl/sync/SyncManager.kt
Outdated
Show resolved
Hide resolved
|
Curious 3rd party here, how does Suwayomi handle a 'loop' where a synced manga has a source which points back to itself through the Suwayomi extension? As far as I know this was never a possible issue to consider with SyncYomi's / TachiyomiSY's original implementation (since most code is copied from TachiyomiSY according to Bartuzen). |
| privacySafe = false, | ||
| ) | ||
|
|
||
| val syncDataManga: MutableStateFlow<Boolean> by BooleanSetting( |
There was a problem hiding this comment.
Is it intentional that the rest of the new settings do not have the syncYomi prefix?
There was a problem hiding this comment.
Yes, because other sync services may be implemented in the future. For example, TachiyomiSY also supports syncing to Google Drive.
syncYomi prefixed options apply only to SyncYomi, while sync prefixed options would apply regardless of the sync service.
server/server-config/src/main/kotlin/suwayomi/tachidesk/server/ServerConfig.kt
Outdated
Show resolved
Hide resolved
server/src/main/kotlin/suwayomi/tachidesk/global/impl/sync/SyncManager.kt
Show resolved
Hide resolved
server/src/main/kotlin/suwayomi/tachidesk/global/impl/sync/SyncManager.kt
Outdated
Show resolved
Hide resolved
server/src/main/kotlin/suwayomi/tachidesk/global/impl/sync/SyncManager.kt
Outdated
Show resolved
Hide resolved
| } | ||
|
|
||
| private fun updateNonFavorites(nonFavorites: List<BackupManga>) { | ||
| nonFavorites.forEach { nonFavorite -> |
There was a problem hiding this comment.
Wouldn't a single query and a batch update be better here?
server/src/main/kotlin/suwayomi/tachidesk/global/impl/sync/SyncYomiSyncService.kt
Outdated
Show resolved
Hide resolved
| ) | ||
|
|
||
| @RequireAuth | ||
| fun startSync(input: StartSyncInput): StartSyncPayload { |
There was a problem hiding this comment.
Should it be possible to stop the sync?
There was a problem hiding this comment.
I was planning to implement that, but backup and restore aren't stoppable, and those are the tasks that actually take a long time. So I decided not to implement it.
server/src/main/kotlin/suwayomi/tachidesk/graphql/subscriptions/SyncSubscription.kt
Outdated
Show resolved
Hide resolved
| ) { | ||
| saveLastUpdateTimestamp() | ||
| scope.launch { | ||
| SyncManager.ensureSync() |
There was a problem hiding this comment.
What is the benefit of starting a sync before an update?
There was a problem hiding this comment.
I'm not exactly sure. That's how it's implemented in TachiyomiSY, so I copied it.
There was a problem hiding this comment.
What is the benefit of starting a sync before an update?
At the time I implemented that because it's better to sync changes first that way everything is "up to date" before triggering an update, so there is no mismatch etc but I think it's not really needed? I haven't really tested it without it but at the time there must have been some bug that made me implement it that way.
This comment was marked as off-topic.
This comment was marked as off-topic.
|
Any updates on when this will be merged into the app? |
Closes #1102
This PR adds SyncYomi support to Suwayomi. Most of the code is taken directly from TachiyomiSY, and modified to work with Suwayomi.
I only tested syncing between a Suwayomi instance and TachiyomiSY. Syncing multiple Suwayomi instances should work, but I didn't test it.
TODO