mateusz-bak / openreads

A mobile books tracker written in Flutter that respects your privacy.
GNU General Public License v2.0
942 stars 58 forks source link

[FEATURE_REQUEST] Simple local sync #462

Open vnckppl opened 9 months ago

vnckppl commented 9 months ago

Is your feature request related to a problem? Please describe. Several feature requests are about automated syncing. Most request propose syncing with a server. Perhaps, we could use another way of syncing the openreads database that bypasses the necesity of a central server.

Describe the solution you'd like We could use syncthing to sync the openreads database between devices. From the Syncthing website:

Syncthing is a continuous file synchronization program. It synchronizes files between two or more computers in real time, safely protected from prying eyes.

So, it does not require a central server, but syncs folders between two devices (P2P). Syncthing is available for Linux, Mac, Windows, and Android. I use it for example to sync my epubs. The reader I use (Book Reader) stores meta-data files next to the epub files for keeping track of progress. Syncthing syncs these meta-data files, allowing me to keep track of my reading progress on multiple devices.

I am not sure how the openreads (binary?) database is stored, but allowing to store the database in a user defined location would allow syncing of this database to multiple devices.

MikaelaLovett commented 9 months ago

Agreed! ✨ This would be amazing, I use this for multiple apps/files as well and it'd make so much sense, honestly!

mateusz-bak commented 9 months ago

That sounds useful, so the goal is to have the database or it's mirror in user storage so it's accessible by Syncthing?

vnckppl commented 9 months ago

Yes exactly. It would then of course also require that the database is read entirely during startup instead of using a cached version. This would be necessary to ensure that any newly synced changes are reflected in the program.

lee-b commented 6 days ago

Agree, syncthing support would be great. Especially if combined with #584 (desktop support).