Skip to content

feat(deezer): support downloading liked tracks from user profile URLs#986

Closed
berettavexee wants to merge 1 commit into
nathom:devfrom
berettavexee:feat/deezer-loved-tracks
Closed

feat(deezer): support downloading liked tracks from user profile URLs#986
berettavexee wants to merge 1 commit into
nathom:devfrom
berettavexee:feat/deezer-loved-tracks

Conversation

@berettavexee

Copy link
Copy Markdown

Summary

  • Adds support for Deezer profile liked-tracks URLs of the form https://www.deezer.com/{lang}/profile/{user_id}/loved
  • New DeezerFavoriteURL class in parse_url.py matches the pattern and creates a PendingPlaylist with a synthetic favorites:{user_id} ID
  • get_playlist() in DeezerClient routes that synthetic ID to a new get_user_favorites() method
  • get_user_favorites() works around a bug in deezer-py where get_user_tracks() silently drops the limit argument when routing to get_my_favorite_tracks(), by detecting the logged-in user and calling get_my_favorite_tracks() directly with the correct limit (up to 2000 tracks for public profiles, up to 10 000 for own profile via song.getFavoriteIds)

Usage

rip url https://www.deezer.com/fr/profile/USER_ID/loved

Test plan

  • URL parses to DeezerFavoriteURL with correct user ID
  • PlaylistMetadata.from_deezer() is compatible with the response format from get_user_favorites()
  • Tested end-to-end with a real Deezer account (405 liked tracks resolved and ready to download)
  • Own profile routes through get_my_favorite_tracks() (full library)
  • Third-party public profiles route through get_user_profile_page() (up to 2000 tracks)

Add support for Deezer profile/loved URLs of the form:
https://www.deezer.com/{lang}/profile/{user_id}/loved

- parse_url.py: new DeezerFavoriteURL class matching the profile/loved pattern
- deezer.py: get_playlist() routes "favorites:{user_id}" IDs to a new
  get_user_favorites() method; workaround for deezer-py dropping the limit
  argument when routing get_user_tracks() to get_my_favorite_tracks()
- cli.py: document supported URL formats in `rip url --help`
- README.md: add feature bullet and usage example

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@berettavexee

Copy link
Copy Markdown
Author

Superseded by #987 which includes the same feature along with a bug fix (gw.get_track blocking the event loop), a perf improvement (cached user ID), and a refactor (named constant for the favorites limit).

@berettavexee berettavexee deleted the feat/deezer-loved-tracks branch June 13, 2026 22:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant