Skip to content

franlov/SpotMyBackup

 
 

Repository files navigation

SpotMigrate

SpotMigrate moves a Spotify library from one account to another. It exports a portable JSON backup, separates owned playlists from playlists followed from other users, and applies the correct action on the destination account.

What It Migrates

  • Owned playlists are recreated with their name, description, visibility, collaboration setting, and transferable tracks in order.
  • Saved songs are added to the destination library.
  • Public playlists owned by other users are followed from the destination account instead of copied as owned playlists.
  • Private or collaborative playlists owned by other users are reported as requiring access from their owner.
  • Local and unavailable tracks are skipped and reported.

Safety Model

  • PKCE authentication with OAuth state validation.
  • Library processing happens in the browser; SpotMigrate does not upload the backup to its own database.
  • Backups include source-account identity to prevent accidental same-account imports.
  • A local migration journal supports resume and positional deduplication.
  • A downloadable receipt can restore that journal in another browser after verifying the backup, source, and destination identities.
  • Playlist creation uses a temporary migration marker to recover from ambiguous Spotify responses without creating another copy.
  • Spotify errors, rate limits, restricted playlists, and skipped tracks are surfaced to the user.

Local Development

  1. Install Node.js and run npm install.
  2. Create an application in the Spotify Developer Dashboard.
  3. Add http://localhost:8888/login.html as a redirect URI.
  4. Copy public/config.example.js to public/config.json and set the client ID and local URLs.
  5. Start the app with npm run serve-express.
  6. Open http://localhost:8888.

The Spotify application must grant access to both source and destination users while it remains in development mode.

Configuration

config = {
    "port": 8888,
    "uri": "http://localhost:8888",
    "login_url": "http://localhost:8888/login",
    "callback_uri": "http://localhost:8888/login.html",
    "client_id": "your-client-id",
    "slowdown_import": 100,
    "slowdown_export": 100
}

Keep production credentials and environment-specific URLs out of commits intended for public distribution.

Commands

  • npm run serve-express: run the application with OAuth routes.
  • npm run serve-simple: serve static files only; OAuth login will not work.
  • npm test: run the migration-logic test suite.

Limitations

  • Spotify does not allow local files to be copied between accounts.
  • Access to private or collaborative playlists owned by someone else must be granted to the new account by the owner.
  • Spotify API quotas can pause large migrations. The local journal preserves completed work for a later retry.
  • Cross-device resume is manual: load the original backup first, then its progress receipt, while connected to the same destination account.
  • Spotify does not preserve the original added_at timestamp when tracks are added to a newly created playlist.

Privacy

OAuth tokens are kept in browser session storage. Backup, receipt, and migration journal data stay on the user's device. Receipts contain progress metadata but not the backup's track list. Review the requested Spotify scopes in index.js before deploying your own instance.

License

GPL-2.0. SpotMigrate is not affiliated with Spotify AB.

About

Backup and Restore your Spotify Playlists and "My Music"

Resources

License

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages

  • HTML 80.9%
  • JavaScript 18.3%
  • Other 0.8%