Skip to content

[BUG] Deezer search ripping appears to always set quality to 2 irrespective of configuration option. #1015

Description

@ijsbol

Describe the bug

Hi,

rip search deezer track 'metric black sheep' --first
Raises
NonStreamableError: The requested quality is not available with your subscription. Deezer HiFi is required for quality 2. Otherwise, the maximum quality allowed is 1.

Despite the config:

[deezer]
quality = 1

I have triple checked this config is the correct one being used & have used the --config-path option as a sanity check.

Command Used

rip search deezer track 'metric black sheep' --first

Debug Traceback

% rip search deezer track 'metric black sheep' --first

╭─────────────────────────────── Traceback (most recent call last) ────────────────────────────────╮
│ /home/abi/ripper/.venv/lib/python3.13/site-packages/streamrip/client/deezer.py:170 in            │
│ get_downloadable                                                                                 │
│                                                                                                  │
│   167 │   │   token = track_info["TRACK_TOKEN"]                                                  │
│   168 │   │   try:                                                                               │
│   169 │   │   │   logger.debug("Fetching deezer url with token %s", token)                       │
│ ❱ 170 │   │   │   url = self.client.get_track_url(token, format_str)                             │
│   171 │   │   except deezer.WrongLicense:                                                        │
│   172 │   │   │   raise NonStreamableError(                                                      │
│   173 │   │   │   │   "The requested quality is not available with your subscription. "          │
│                                                                                                  │
│ /home/abi/ripper/.venv/lib/python3.13/site-packages/deezer/__init__.py:151 in get_track_url      │
│                                                                                                  │
│   148 │   │   return (self.current_user, self.selected_account)                                  │
│   149 │                                                                                          │
│   150 │   def get_track_url(self, track_token, track_format):                                    │
│ ❱ 151 │   │   tracks = self.get_tracks_url([track_token, ], track_format)                        │
│   152 │   │   if len(tracks) > 0:                                                                │
│   153 │   │   │   if isinstance(tracks[0], DeezerError):                                         │
│   154 │   │   │   │   raise tracks[0]                                                            │
│                                                                                                  │
│ /home/abi/ripper/.venv/lib/python3.13/site-packages/deezer/__init__.py:165 in get_tracks_url     │
│                                                                                                  │
│   162 │   │   if not self.current_user.get('license_token'):                                     │
│   163 │   │   │   return []                                                                      │
│   164 │   │   if (track_format == "FLAC" or track_format.startswith("MP4_RA")) and not self.cu   │
│ ❱ 165 │   │   │   raise WrongLicense(format)                                                     │
│   166 │   │                                                                                      │
│   167 │   │   result = []                                                                        │
│   168 │   │   try:                                                                               │
╰──────────────────────────────────────────────────────────────────────────────────────────────────╯
WrongLicense

During handling of the above exception, another exception occurred:

╭─────────────────────────────── Traceback (most recent call last) ────────────────────────────────╮
│ /home/abi/ripper/.venv/bin/rip:10 in <module>                                                    │
│                                                                                                  │
│    7 │   │   sys.argv[0] = sys.argv[0][:-11]                                                     │
│    8 │   elif sys.argv[0].endswith(".exe"):                                                      │
│    9 │   │   sys.argv[0] = sys.argv[0][:-4]                                                      │
│ ❱ 10 │   sys.exit(rip())                                                                         │
│   11                                                                                             │
│                                                                                                  │
│ /home/abi/ripper/.venv/lib/python3.13/site-packages/click/core.py:1569 in __call__               │
│                                                                                                  │
│                                     ... 11 frames hidden ...                                     │
│                                                                                                  │
│ /home/abi/ripper/.venv/lib/python3.13/site-packages/streamrip/media/track.py:237 in resolve      │
│                                                                                                  │
│   234 │   │                                                                                      │
│   235 │   │   os.makedirs(folder, exist_ok=True)                                                 │
│   236 │   │                                                                                      │
│ ❱ 237 │   │   embedded_cover_path, downloadable = await asyncio.gather(                          │
│   238 │   │   │   self._download_cover(album.covers, folder),                                    │
│   239 │   │   │   self.client.get_downloadable(self.id, quality),                                │
│   240 │   │   )                                                                                  │
│                                                                                                  │
│ /home/abi/ripper/.venv/lib/python3.13/site-packages/streamrip/client/deezer.py:172 in            │
│ get_downloadable                                                                                 │
│                                                                                                  │
│   169 │   │   │   logger.debug("Fetching deezer url with token %s", token)                       │
│   170 │   │   │   url = self.client.get_track_url(token, format_str)                             │
│   171 │   │   except deezer.WrongLicense:                                                        │
│ ❱ 172 │   │   │   raise NonStreamableError(                                                      │
│   173 │   │   │   │   "The requested quality is not available with your subscription. "          │
│   174 │   │   │   │   "Deezer HiFi is required for quality 2. Otherwise, the maximum "           │
│   175 │   │   │   │   "quality allowed is 1.",                                                   │
╰──────────────────────────────────────────────────────────────────────────────────────────────────╯
NonStreamableError: The requested quality is not available with your subscription. Deezer HiFi is required for quality 2. Otherwise, the 
maximum quality allowed is 1.

Config File

[deezer]
quality = 1
arl = "..."
use_deezloader = true
deezloader_warnings = true

Operating System

Linux

streamrip version

2.1.0

Screenshots and recordings

No response

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions