SimpMusic icon indicating copy to clipboard operation
SimpMusic copied to clipboard

SimpMusic Account Option

Open nighthawk2145 opened this issue 8 months ago • 3 comments

Problem Description

There's no way to cross-sync app data. Since this data is such a large amount that we don't want to lose, it would be helpful to have a backup.

Proposed Solution

Optional SimpMusic account to sync all app data (to use on ANY device).

Alternative Solutions

Allow changing of auto-save location - change from downloads folder to a folder of our own choosing (such as cloud-based).

Additional Context

No response

nighthawk2145 avatar Mar 25 '26 05:03 nighthawk2145

Io sincronizzo le mie playlist su YouTube, e le rendo private. Quando ascolto da un'altro dispositivo con il mio account faccio l'aggiornamento delle playlist che so di avere modificato.

Salvo3D avatar Apr 24 '26 12:04 Salvo3D

+1, and I'd like to propose a concrete shape for this that needs no SimpMusic server, in case it helps decide whether it's something you'd accept. I'm willing to implement it.

Why "just sync the files" doesn't work today

  • On Android the database and DataStore live in the app's private storage, so no sync app can reach them without root.
  • Even where they are reachable (Desktop), two live instances writing whole SQLite files means last-copy-wins: a favourite added on one device is wiped by the other's copy, and with WAL you can end up with a corrupt DB.
  • Backup/restore is the only bridge, and restore replaces everything (plus cross-platform restores have rough edges, e.g. #2361).

Proposal: sync through a folder the user picks

Opt-in, off by default. The user picks a folder (SAF on Android, a plain path on Desktop) that their own tool keeps in sync: Google Drive, Nextcloud, Syncthing, whatever. SimpMusic only reads and writes files there, so no network code, no OAuth client, no hosting. It also covers #1661 as a side effect.

One file per device. Each device writes only devices/<deviceId>.json and reads everyone else's. No two devices ever write the same file, so cloud tools never produce conflict copies, and each device merges on read.

A merge rule per kind of data instead of copying the DB:

Data Rule
Preferences per key, last write wins (timestamped)
Favourites, local playlists, followed artists add/remove with timestamps (tombstones), so concurrent edits don't lose anything
Listening history / analytics append-only, de-duplicated by event id
Queue not merged. Each device publishes its current session (queue, track, position); the other offers "Continue from ", like Spotify Connect, instead of the queue changing under you

Never synced: account cookies / tokens, download paths and downloaded-state, window and mini-player positions, hardware-bound audio/rendering settings.

Scope

It would sit in core/data (export/import of the per-device snapshot, merge) with a small Settings entry per platform, and could land in steps: preferences first, then favourites/playlists, then history, then queue handoff.

Would you accept a PR along these lines? If you'd rather have a different shape (e.g. a single encrypted archive, or not syncing some of these), I'm happy to adapt before writing any code.

Me-xico avatar Sep 15 '26 15:09 Me-xico

Thanks for the request. A separate SimpMusic account isn't planned: your sign-ins stay with YouTube Music (and Spotify, Discord, Last.fm), and Login Sync moves them from phone to desktop. Closing as not planned.

maxrave-dev avatar Oct 14 '26 08:10 maxrave-dev