CollapseLauncher / Collapse

An Advanced Launcher for miHoYo/HoYoverse Games
MIT License
1.4k stars 64 forks source link

[Request]: Sync/save playtime between devices via authentication #569

Closed Cactism closed 1 month ago

Cactism commented 2 months ago

Is your request related to a problem?

No

How is the feature request related to the problem?

No response

Describe your proposed solution

It would be cool to have a feature where you can upload, save, and sync playtime between devices by logging in via Github, Google, etc.

Describe alternatives you've considered

Manually editing the playtime, but this obviously doesn't really fix the 'problem' of syncing playtime between devices.

Additional context

The sign-in/sync button could be in the Edit Playtime pop-up, in between the Change and reset button. image

If synced via Google, maybe it could be integrated via Google Drive? I know that Delta uses Google Drive syncing and it somehow doesn't even count towards your storage quota??? (For example I had a 500MB game stored/synced through there and after removing the game from the sync, my Google Drive's used storage didn't go down) If it would be of any use, the only storage related permission Delta asks for is See, create, and delete its down configuration data in your Google Drive.

If there are two synced devices playing the same game and region at the same time, I'd personally prefer that the same time would just be counted once, rather than the time being counted seperately.

e.g. if the example below was a timeline of minutes (=) spent playing,

PC 1: =====
PC 2:   =====
Time added: 7 minutes
Sloweneuh commented 2 months ago

Quoted from an answer to this suggestion I gave on the discord a few months ago :

"Hi~

Thanks for the suggestion, unfortunately due to our strict data collection policy, we are currently unable to implement this feature. Afraid not, shall we change our mind about this kind of data and feature, we will update this ticket."

Cactism commented 2 months ago

Quoted from an answer to this suggestion I gave on the discord a few months ago :

"Hi~

Thanks for the suggestion, unfortunately due to our strict data collection policy, we are currently unable to implement this feature. Afraid not, shall we change our mind about this kind of data and feature, we will update this ticket."

rip to this idea :( I'll keep this issue open in case they do change their minds

bagusnl commented 2 months ago

Like I said before, its our own data collection policy, which we definitely could change, but with a clear mind. If anyone have suggestion, is there any database collection service that doesn't charge much (preferably free) and has C# library supporting it.

Cloudflare D1 does have free service, but limits to 100K line writes/day, which technically sufficient for current Collapse estimated user count, but maybe not for long, especially if user wants to sync them up quite often. D1 also doesn't really have C# library or documentation supporting it, so it would be quite the work implementing it

Sloweneuh commented 1 month ago

The Google Drive API that Cactism suggested would definitely work, and is the one used by other Hoyoverse community tools.

bagusnl commented 1 month ago

Google integration might be too complicated since OAUTH and stuff currently I made a prototype that uses SQLite database, synced to server. This way no data comes through us as its handled entirely by third party, which the user could make their own account that is separate from Collapse's team DB)

Each user will need to have their own database but they can make themself in turso https://turso.tech (my free account could handle at the very least 300-400 users, but we can't ship the database' Token as its a security risk)

No UI or whatever right now, since I just finished the backend of things, but let us know what you all think about it

Cactism commented 1 month ago

It sounds like a good idea! I'll be sure to test it out once it comes out