mirror of
https://github.com/nathom/streamrip.git
synced 2025-05-24 12:07:14 -04:00
Merge branch 'dev'
This commit is contained in:
commit
02f7f7557e
6 changed files with 33 additions and 25 deletions
17
README.md
17
README.md
|
@ -18,24 +18,13 @@ A scriptable stream downloader for Qobuz, Tidal, Deezer and SoundCloud.
|
||||||
|
|
||||||
## Installation
|
## Installation
|
||||||
|
|
||||||
First, ensure [pip](https://pip.pypa.io/en/stable/installing/) is installed. Then run the following in the command line:
|
First, ensure [Python](https://www.python.org/downloads/) and [pip](https://pip.pypa.io/en/stable/installing/) are installed. Then run the following in the command line:
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
macOS/Linux:
|
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
pip3 install streamrip simple-term-menu --upgrade
|
pip3 install streamrip --upgrade
|
||||||
```
|
```
|
||||||
|
|
||||||
Windows:
|
If you would like to use `streamrip`'s conversion capabilities, download TIDAL videos, or download music from SoundCloud, install [ffmpeg](https://ffmpeg.org/download.html). To download music from YouTube, install [youtube-dl](https://github.com/ytdl-org/youtube-dl#installation).
|
||||||
|
|
||||||
```bash
|
|
||||||
pip3 install streamrip windows-curses --upgrade
|
|
||||||
```
|
|
||||||
|
|
||||||
|
|
||||||
If you would like to use `streamrip`'s conversion capabilities, download TIDAL videos, or download music from SoundCloud, install [ffmpeg](https://ffmpeg.org/download.html).
|
|
||||||
|
|
||||||
|
|
||||||
## Example Usage
|
## Example Usage
|
||||||
|
|
|
@ -4,6 +4,3 @@ pathvalidate
|
||||||
requests
|
requests
|
||||||
mutagen
|
mutagen
|
||||||
tqdm
|
tqdm
|
||||||
pycryptodome
|
|
||||||
pick
|
|
||||||
colorama
|
|
||||||
|
|
11
setup.py
11
setup.py
|
@ -9,12 +9,21 @@ def read_file(fname):
|
||||||
|
|
||||||
|
|
||||||
requirements = read_file("requirements.txt").strip().split()
|
requirements = read_file("requirements.txt").strip().split()
|
||||||
|
requirements.append("simple-term-menu; platform_system == 'Linux'")
|
||||||
|
requirements.append("simple-term-menu; platform_system == 'Darwin'")
|
||||||
|
requirements.append("pick; platform_system == 'Windows'")
|
||||||
|
# Needed for pick to work
|
||||||
|
requirements.append("windows-curses; platform_system == 'Windows'")
|
||||||
|
|
||||||
|
# required for click colors
|
||||||
|
# can be removed when click v8.0 is released
|
||||||
|
requirements.append("colorama; platform_system == 'Windows'")
|
||||||
|
|
||||||
|
|
||||||
# https://github.com/pypa/sampleproject/blob/main/setup.py
|
# https://github.com/pypa/sampleproject/blob/main/setup.py
|
||||||
setup(
|
setup(
|
||||||
name=pkg_name,
|
name=pkg_name,
|
||||||
version="0.5.3",
|
version="0.5.4",
|
||||||
author="Nathan",
|
author="Nathan",
|
||||||
author_email="nathanthomas707@gmail.com",
|
author_email="nathanthomas707@gmail.com",
|
||||||
keywords="lossless, hi-res, qobuz, tidal, deezer, audio, convert, soundcloud, mp3",
|
keywords="lossless, hi-res, qobuz, tidal, deezer, audio, convert, soundcloud, mp3",
|
||||||
|
|
|
@ -1,3 +1,3 @@
|
||||||
"""streamrip: the all in one music downloader."""
|
"""streamrip: the all in one music downloader."""
|
||||||
|
|
||||||
__version__ = "0.5.3"
|
__version__ = "0.5.4"
|
||||||
|
|
|
@ -228,6 +228,10 @@ class ConfigDocumentation:
|
||||||
download_videos: Download the video along with the audio
|
download_videos: Download the video along with the audio
|
||||||
video_downloads_folder: The path to download the videos to
|
video_downloads_folder: The path to download the videos to
|
||||||
database: This stores a list of item IDs so that repeats are not downloaded.
|
database: This stores a list of item IDs so that repeats are not downloaded.
|
||||||
|
conversion: Convert tracks to a codec after downloading them.
|
||||||
|
codec: FLAC, ALAC, OPUS, MP3, VORBIS, or AAC
|
||||||
|
sampling_rate: In Hz. Tracks are downsampled if their sampling rate is greater than this. Values greater than 48000 are only recommended if the audio will be processed. It is otherwise a waste of space as the human ear cannot discern higher frequencies.
|
||||||
|
bit_depth: Only 16 and 24 are available. It is only applied when the bit depth is higher than this value.
|
||||||
filters: Filter a Qobuz artist's discography. Set to 'true' to turn on a filter.
|
filters: Filter a Qobuz artist's discography. Set to 'true' to turn on a filter.
|
||||||
extras: Remove Collectors Editions, live recordings, etc.
|
extras: Remove Collectors Editions, live recordings, etc.
|
||||||
repeats: Picks the highest quality out of albums with identical titles.
|
repeats: Picks the highest quality out of albums with identical titles.
|
||||||
|
@ -249,6 +253,7 @@ class ConfigDocumentation:
|
||||||
track: Available keys: "tracknumber", "artist", "albumartist", "composer", and "title"
|
track: Available keys: "tracknumber", "artist", "albumartist", "composer", and "title"
|
||||||
lastfm: Last.fm playlists are downloaded by searching for the titles of the tracks
|
lastfm: Last.fm playlists are downloaded by searching for the titles of the tracks
|
||||||
source: The source on which to search for the tracks.
|
source: The source on which to search for the tracks.
|
||||||
|
fallback_source: If no results were found with the primary source, the item is searched for on this one.
|
||||||
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.
|
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.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
|
|
@ -1,24 +1,19 @@
|
||||||
"""Miscellaneous utility functions."""
|
"""Miscellaneous utility functions."""
|
||||||
|
|
||||||
import base64
|
import base64
|
||||||
import contextlib
|
|
||||||
import logging
|
import logging
|
||||||
import os
|
import os
|
||||||
import re
|
import re
|
||||||
import sys
|
|
||||||
from string import Formatter
|
from string import Formatter
|
||||||
from typing import Dict, Hashable, Optional, Union
|
from typing import Dict, Hashable, Optional, Union
|
||||||
|
|
||||||
import click
|
import click
|
||||||
import requests
|
import requests
|
||||||
from Crypto.Cipher import AES
|
|
||||||
from Crypto.Util import Counter
|
|
||||||
from pathvalidate import sanitize_filename
|
from pathvalidate import sanitize_filename
|
||||||
from requests.packages import urllib3
|
from requests.packages import urllib3
|
||||||
from tqdm import tqdm
|
from tqdm import tqdm
|
||||||
from tqdm.contrib import DummyTqdmFile
|
|
||||||
|
|
||||||
from .constants import AGENT, LOG_DIR, TIDAL_COVER_URL
|
from .constants import AGENT, TIDAL_COVER_URL
|
||||||
from .exceptions import InvalidSourceError, NonStreamable
|
from .exceptions import InvalidSourceError, NonStreamable
|
||||||
|
|
||||||
urllib3.disable_warnings()
|
urllib3.disable_warnings()
|
||||||
|
@ -215,6 +210,19 @@ def decrypt_mqa_file(in_path, out_path, encryption_key):
|
||||||
:param out_path:
|
:param out_path:
|
||||||
:param encryption_key:
|
:param encryption_key:
|
||||||
"""
|
"""
|
||||||
|
try:
|
||||||
|
from Crypto.Cipher import AES
|
||||||
|
from Crypto.Util import Counter
|
||||||
|
except (ImportError, ModuleNotFoundError):
|
||||||
|
click.secho(
|
||||||
|
"To download this item in MQA, you need to run ",
|
||||||
|
fg="yellow",
|
||||||
|
nl=False,
|
||||||
|
)
|
||||||
|
click.secho("pip3 install pycryptodome --upgrade", fg="blue", nl=False)
|
||||||
|
click.secho(".")
|
||||||
|
raise click.Abort
|
||||||
|
|
||||||
# Do not change this
|
# Do not change this
|
||||||
master_key = "UIlTTEMmmLfGowo/UC60x2H45W6MdGgTRfo/umg4754="
|
master_key = "UIlTTEMmmLfGowo/UC60x2H45W6MdGgTRfo/umg4754="
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue