Closed scowalt closed 2 years ago
That could be an interesting feature. You can already do it from each game's context menu, which I think would be enough for most people, but I could see this being helpful for someone who switches computers a lot and wants it to be automatic.
Yes, that's exactly the scenario I have! (I have an office computer and an "HTPC" computer that I switch between).
This is also what, for example, Steam Cloud does. It will auto-sync data when a game closes, but it will also attempt to sync data in a blocking manner before launching a game. If the data doesn't sync correctly on launch, Steam will prompt the user for further action.
I think it would be worth checking if the save is the same before doing so, as it is a waste (of time, bandwidth, read write cycles on an ssd, etc, but most notably time) to retrieve the save every time.
@turtleship69 That's a good point! Ludusavi already takes care of that internally and won't re-copy files during a restore if they're identical, so the plugin code won't have to worry about it (once I have a chance to add this option 😅):
Right now there's an option to "Back up save data for a game when you finish playing it". I think the logical inverse could also be useful: "Restore save data for a game before you start playing it".
Implementation: when the "Play" button is hit for an applicable game, synchronously wait to launch the game until the ludusavi restore command finishes. If the restore fails, maybe optionally abort launching the game.
This would be useful to have the backup (or cloud) folder be the ultimate "source of truth" for the location of save games.