Digital

music-sync: Migrate Your Yandex Music Library to Deezer in Minutes

Yandex Music is in decline. The platform faces increasing pressure, licensing issues, and an uncertain future. If you’ve been a loyal subscriber with hundreds of favorites and dozens of playlists, the question isn’t «should I switch?»—it’s «how do I switch without losing everything I’ve built?» Most streaming services make this deliberately hard: your library is locked behind their proprietary API, and moving it elsewhere requires hours of manual copy-paste work, finding tracks one-by-one across another platform, and rebuilding playlists from scratch.

That’s what music-sync solves. It automates the complete migration of your Yandex Music library into Deezer in minutes—no manual work, no lost data, no abandoned playlists. It handles the complexity that streaming services deliberately hide: track ID mismatches, regional availability variations, deduplication logic, and intelligent fallback matching when an exact track doesn’t exist on your destination platform. In this guide, you’ll learn how music-sync works, how to set it up in 5 minutes, what data gets transferred and how it’s protected, and how to handle edge cases like regional variations and unavailable tracks.

What music-sync Does

music-sync is a command-line tool written in Python that connects to your Yandex Music account, extracts your music data, searches for equivalent tracks in Deezer, and creates matching playlists and favorites. It’s designed to handle the complexity that streaming services deliberately hide.

What Gets Transferred

  • Liked tracks → Added to Deezer Favorites with fallback matching
  • Playlists → New playlists in Deezer with the same structure and track order
  • Liked artists and albums → Exported as lists for manual favoriting
  • Deduplication → Skips tracks already in Deezer Favorites to prevent duplicates
  • Retry mechanism → Attempts multiple search strategies for unmatched tracks

Installation & Setup

Prerequisites

  • Python 3.8 or newer
  • pip (Python package manager)
  • A Yandex Music account (free or premium)
  • A Deezer account (free tier works fine)
  • ~5 minutes of setup time

Step 1: Clone and Install

Clone the music-sync repository and install dependencies:

git clone https://github.com/razqqm/music-sync.git
cd music-sync
python3 -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt
cp .env.example .env

Step 2: Authorize Yandex Music

Yandex Music uses OAuth for secure authentication:

python3 get_token.py

Your default browser will open automatically. Log in to your Yandex account, grant permission, and the script will save your OAuth token to .env automatically.

Step 3: Authorize Deezer

Deezer requires a different approach. You’ll grab an ARL cookie from your browser:

  1. Open https://www.deezer.com in your browser and log in
  2. Open DevTools (press F12)
  3. Go to the Application tab → Cookies → deezer.com
  4. Find the cookie named arl and copy its value
  5. Run the Deezer auth script:
python3 deezer_auth.py

How to Use music-sync

Complete Library Migration (Most Common)

Scenario: You have 240 liked tracks, 12 playlists, 50 liked artists in Yandex Music. You want to switch to Deezer.

Process:

  1. Run yandex_export.py → extracts all data (5 seconds)
  2. Run sync.py → matches ~95% of your tracks (2 minutes)
  3. Review sync_report.json → see what’s missing
  4. Run retry_missing.py → find alternative versions (1 minute)
  5. Run apply_retry.py → add them to Deezer (30 seconds)

Result: Your entire library is now on Deezer, playlists intact, zero manual work beyond running 5 commands.

Sync Only Favorites (Selective)

Before running sync.py, edit data/yandex_export.json and remove tracks you don’t want. Keep only your top favorites. Then run sync.py as normal—only the tracks you kept will be synced.

Incremental Syncs

Run yandex_export.py again to get the latest data. Run sync.py → it automatically skips duplicates and previously synced tracks. Only new tracks get added to Deezer.

Common Questions

What data is kept locally?

All your Yandex and Deezer data is processed locally on your machine. The tool only sends search queries to the Deezer API (just artist + title text) to find matching tracks. Your raw music library never leaves your computer. OAuth tokens and ARL cookies are stored in your local .env file, not uploaded anywhere.

What happens to tracks that don’t exist on Deezer?

They’re logged in sync_report.json as «missed_tracks.» You can use retry_missing.py to attempt alternative search strategies. If a track still can’t be found, you can decide whether to skip it or search manually on Deezer.

Does this work with other streaming services?

Currently, music-sync supports Yandex Music → Deezer out of the box. Spotify and Apple Music support are planned. The architecture is modular, so adding new services is straightforward.

Conclusion

If you’ve been stuck on Yandex Music because the thought of manually migrating your library felt overwhelming, music-sync removes that barrier. Whether you have 50 favorite tracks or 500, the entire process takes minutes instead of hours.

Оцените статью