Skip to content

Commit

Permalink
Fix #58 and #59
Browse files Browse the repository at this point in the history
  • Loading branch information
nathom committed Apr 20, 2021
1 parent d3ba6e0 commit 2d35001
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 4 deletions.
8 changes: 6 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -128,12 +128,15 @@ the descriptions of the fields. They can also be found inside the file, which
can be accessed with `rip config --open`.

```yaml
qobuz:
qobuz:
quality: '1: 320kbps MP3, 2: 16/44.1, 3: 24/<=96, 4: 24/>=96'
download_booklets: 'This will download booklet pdfs that are included with some albums'
password: 'This is an md5 hash of the plaintext password'
app_id: 'Do not change'
secrets: 'Do not change'
tidal:
quality: '0, 1, 2, or 3'
quality: '0: 256kbps AAC, 1: 320kbps AAC, 2: 16/44.1 "HiFi" FLAC, 3: 24/44.1 "MQA" FLAC'
download_videos: 'This will download videos included in Video Albums.'
user_id: 'Do not change any of the fields below'
token_expiry: 'Tokens last 1 week after refresh. This is the Unix timestamp of the expiration time.'
deezer: "Deezer doesn't require login"
Expand Down Expand Up @@ -163,6 +166,7 @@ qobuz:
lastfm: 'Last.fm playlists are downloaded by searching for the titles of the tracks'
source: 'The source on which to search for the tracks.'
concurrent_downloads: 'Download (and convert) tracks all at once, instead of sequentially. If you are converting the tracks, and/or have fast internet, this will substantially improve processing speed.'

```


Expand Down
1 change: 1 addition & 0 deletions streamrip/clients.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
AGENT,
AVAILABLE_QUALITY_IDS,
DEEZER_BASE,
DEEZER_DL,
DEEZER_MAX_Q,
QOBUZ_BASE,
QOBUZ_FEATURED_KEYS,
Expand Down
2 changes: 0 additions & 2 deletions streamrip/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
import logging
import os
import re
from functools import cache
from pprint import pformat

from ruamel.yaml import YAML
Expand Down Expand Up @@ -310,7 +309,6 @@ def dump(self, path: str):
# key, doc pairs are unique
self.docs.remove(to_remove)

@cache
def _get_key_regex(self, spaces, key):
regex = rf"{spaces}{key}:(?:$|\s+?(.+))"
return re.compile(regex)
Expand Down
2 changes: 2 additions & 0 deletions streamrip/metadata.py
Original file line number Diff line number Diff line change
Expand Up @@ -333,6 +333,8 @@ def genre(self) -> Optional[str]:
if self.__source == "qobuz":
genres = re.findall(r"([^\u2192\/]+)", "/".join(self._genres))
genres = set(genres)
elif self.__source == 'deezer':
genres = ', '.join(g['name'] for g in self._genres)

return ", ".join(genres)

Expand Down

0 comments on commit 2d35001

Please sign in to comment.