Update README

This commit is contained in:
nathom 2021-04-05 21:09:51 -07:00
parent caa959ba2c
commit be1ac789da
3 changed files with 23 additions and 22 deletions

View file

@ -1,10 +1,10 @@
# streamrip # streamrip
A scriptable stream downloader for Qobuz, Tidal, and Deezer. A scriptable stream downloader for Qobuz, Tidal, Deezer and SoundCloud.
## Features ## Features
- Downloads tracks, albums, playlists, discographies, and labels from Qobuz, Tidal, and Deezer - Downloads tracks, albums, playlists, discographies, and labels from Qobuz, Tidal, Deezer, and SoundCloud
- Automatically converts files to a preferred format - Automatically converts files to a preferred format
- Has a database that stores the downloaded tracks' IDs so that repeats are avoided - Has a database that stores the downloaded tracks' IDs so that repeats are avoided
@ -30,7 +30,7 @@ pip3 install streamrip windows-curses --upgrade
If you would like to use `streamrip`'s conversion capabilities, install [ffmpeg](https://ffmpeg.org/download.html). If you would like to use `streamrip`'s conversion capabilities, or download music from SoundCloud, install [ffmpeg](https://ffmpeg.org/download.html).
## Example Usage ## Example Usage
@ -55,11 +55,11 @@ rip --convert mp3 -u https://open.qobuz.com/album/0060253780968
To set the quality, use the `--quality` option to `0, 1, 2, 3, 4`: To set the quality, use the `--quality` option to `0, 1, 2, 3, 4`:
| Quality ID | Audio Quality | Available Sources | | Quality ID | Audio Quality | Available Sources |
| ---------- | --------------------- | -------------------- | | ---------- | --------------------- | -------------------------------------------- |
| 0 | 128 kbps MP3 or AAC | Deezer, Tidal | | 0 | 128 kbps MP3 or AAC | Deezer, Tidal, SoundCloud (most of the time) |
| 1 | 320 kbps MP3 or AAC | Deezer, Tidal, Qobuz | | 1 | 320 kbps MP3 or AAC | Deezer, Tidal, Qobuz, SoundCloud (rarely) |
| 2 | 16 bit, 44.1 kHz (CD) | Deezer, Tidal, Qobuz | | 2 | 16 bit, 44.1 kHz (CD) | Deezer, Tidal, Qobuz, SoundCloud (rarely) |
| 3 | 24 bit, ≤ 96 kHz | Tidal (MQA), Qobuz | | 3 | 24 bit, ≤ 96 kHz | Tidal (MQA), Qobuz, SoundCloud (rarely) |
| 4 | 24 bit, ≤ 192 kHz | Qobuz | | 4 | 24 bit, ≤ 192 kHz | Qobuz |
@ -70,10 +70,10 @@ To set the quality, use the `--quality` option to `0, 1, 2, 3, 4`:
rip --quality 3 https://tidal.com/browse/album/147569387 rip --quality 3 https://tidal.com/browse/album/147569387
``` ```
Search for *Fleetwood Mac - Rumours* on Qobuz Search for albums matching `lil uzi vert` on SoundCloud
```bash ```bash
rip search 'fleetwood mac rumours' rip search -s soundcloud 'lil uzi vert'
``` ```
![streamrip interactive search](https://github.com/nathom/streamrip/blob/main/demo/interactive_search.png?raw=true) ![streamrip interactive search](https://github.com/nathom/streamrip/blob/main/demo/interactive_search.png?raw=true)
@ -155,6 +155,7 @@ Thanks to Vitiko98, Sorrow446, and DashLt for their contributions to this projec
- [qobuz-dl](https://github.com/vitiko98/qobuz-dl) - [qobuz-dl](https://github.com/vitiko98/qobuz-dl)
- [Qo-DL Reborn](https://github.com/badumbass/Qo-DL-Reborn) - [Qo-DL Reborn](https://github.com/badumbass/Qo-DL-Reborn)
- [Tidal-Media-Downloader](https://github.com/yaronzz/Tidal-Media-Downloader) - [Tidal-Media-Downloader](https://github.com/yaronzz/Tidal-Media-Downloader)
- [scdl](https://github.com/flyingrub/scdl)

Binary file not shown.

Before

Width:  |  Height:  |  Size: 349 KiB

After

Width:  |  Height:  |  Size: 490 KiB

Before After
Before After

View file

@ -709,7 +709,6 @@ class Album(Tracklist):
def load_meta(self): def load_meta(self):
assert hasattr(self, "id"), "id must be set to load metadata" assert hasattr(self, "id"), "id must be set to load metadata"
self.meta = self.client.get(self.id, media_type="album") self.meta = self.client.get(self.id, media_type="album")
pprint(self.meta)
# update attributes based on response # update attributes based on response
for k, v in self._parse_get_resp(self.meta, self.client).items(): for k, v in self._parse_get_resp(self.meta, self.client).items():
@ -865,7 +864,8 @@ class Album(Tracklist):
True by default. True by default.
""" """
self.folder_format = kwargs.get("folder_format", FOLDER_FORMAT) self.folder_format = kwargs.get("folder_format", FOLDER_FORMAT)
folder = self._get_formatted_folder(parent_folder) quality = min(quality, self.client.max_quality)
folder = self._get_formatted_folder(parent_folder, quality)
os.makedirs(folder, exist_ok=True) os.makedirs(folder, exist_ok=True)
logger.debug("Directory created: %s", folder) logger.debug("Directory created: %s", folder)
@ -940,15 +940,15 @@ class Album(Tracklist):
return fmt return fmt
def _get_formatted_folder(self, parent_folder: str) -> str: def _get_formatted_folder(self, parent_folder: str, quality: int) -> str:
if self.bit_depth is not None and self.sampling_rate is not None: if quality >= 2:
self.container = "FLAC" self.container = 'FLAC'
elif self.client.source in ("qobuz", "deezer", "soundcloud"):
self.container = "MP3"
elif self.client.source == "tidal":
self.container = "AAC"
else: else:
raise Exception(f"{self.bit_depth}, {self.sampling_rate}") self.bit_depth = self.sampling_rate = None
if self.client.source == 'tidal':
self.container = 'AAC'
else:
self.container = 'MP3'
formatted_folder = clean_format(self.folder_format, self._get_formatter()) formatted_folder = clean_format(self.folder_format, self._get_formatter())