A simple tool to find and remove duplicate songs from your Deezer playlists and favorites, right from your terminal.
- Find and remove duplicates in any playlist or your favorites.
- Flexible deduplication: by ISRC (unique song ID), by song name & artist, or both.
- Preview mode: See which songs would be removed before making changes.
- Encrypted cookie storage: Your login session is stored securely.
- Works interactively or via command-line arguments.
- No Playwright required if you provide your own Deezer cookie.
You can either:
- Clone the repository:
git clone https://github.com/bertigert/DeezerDeduplicator.git cd DeezerDeduplicator - Or download the ZIP from GitHub and extract it.
Then install dependencies inside the newly created folder:
Note: This was written in python 3.12, older version might work, newer version might require newer versions of the libraries used.
pip install -r requirements.txtIf you don't want to install Playwright (for headless/CLI-only use), use:
pip install -r minrequirements.txt
If you want to log in interactively (using playwright):
playwright installSee Playwright Python docs for more info.
- Double-click
run.bat
or - Open a terminal and run:
python main.py
- Run in your terminal:
or
bash run.sh
python3 main.py
You'll be guided through login (if needed), playlist selection, and deduplication options.
You can automate everything with arguments:
python main.py --playlist-ids=ALL --deduplicate-by=3 --executeYou can also use deduplicate.bat as an alias for python main.py:
deduplicate --playlist-ids=ALL --deduplicate-by=3 --executeYou can use deduplicate.sh:
bash deduplicate.sh --playlist-ids=ALL --deduplicate-by=3 --executeYou might want to
chmod +xthe shell files
-
--log-level, -ll
Set logging level (DEBUG, INFO, WARNING, ERROR, CRITICAL). Default: INFO -
--cookie, -c
Provide your Deezersidcookie directly (no Playwright needed). -
--cookie-path, -cp
Path to encrypted cookie file. Default:cookies.json.enc -
--dont-store-cookies, -dsc
Don't save cookies to a file. -
--deduplicate-by, -db
1 = ISRC, 2 = Song name & artist, 3 = Both -
--execute, -e, -x
Actually remove duplicates -
--only-show, -os
Only show what would be removed (overrides --execute) If neither --execute or --only-show is set, the user will be prompted. -
--playlist-ids, -pids
Comma-separated playlist IDs (from Deezer URL), orALLfor all playlists. -
--playlist-names, -pnames
Comma-separated playlist names (not recommended if you have duplicate names). Use\to escape commas in names. -
--browser, -b
Which Playwright browser to use for login (chromium,firefox, orwebkit). Default:chromium.
Preview duplicates in all playlists, using both ISRC and name+artist:
python main.py --playlist-ids=ALL --deduplicate-by=3 --only-showActually remove duplicates:
python main.py --playlist-ids=ALL --deduplicate-by=3 --executeQ: Do I need Playwright?
A: Only if you want to log in interactively. If you provide a valid sid cookie (via --cookie or --cookie-path), Playwright is not needed.
Q: How do I get my Deezer sid cookie?
A: Use browser dev tools or an extension to copy the sid cookie after logging in to Deezer.
Q: Is my login info safe?
A: Your cookie is encrypted on disk using a key in the repo. You can manually edit the key, but it really wouldn't change anything.
- If you get errors about Playwright, make sure it's installed and run
playwright install. - If login fails, try deleting
cookies.json.encand logging in again. - For more details, run with
--log-level DEBUG.