This commit is contained in:
vitiko98 2020-12-09 23:39:16 -04:00
parent 78d9275579
commit 9af672df42
3 changed files with 26 additions and 22 deletions

View File

@ -38,24 +38,6 @@ qobuz-dl.exe
> If something fails, run `qobuz-dl -r` to reset your config file. > If something fails, run `qobuz-dl -r` to reset your config file.
## Examples ## Examples
### Interactive mode
Run interactive mode with a limit of 10 results
```
qobuz-dl fun -l 10
```
Now you can search albums and tracks:
```
Logging...
Logged: OK
Membership: Studio
Enter your search: [Ctrl + c to quit]
- fka twigs magdalene
```
Everything else is interactive. Enjoy.
Run `qobuz-dl fun --help` for more info.
### Download mode ### Download mode
Download URL in 24B<96khz quality Download URL in 24B<96khz quality
@ -81,6 +63,25 @@ qobuz-dl dl https://play.qobuz.com/playlist/5388296 -q 27
Run `qobuz-dl dl --help` for more info. Run `qobuz-dl dl --help` for more info.
### Interactive mode
Run interactive mode with a limit of 10 results
```
qobuz-dl fun -l 10
```
Type your search query
```
Logging...
Logged: OK
Membership: Studio
Enter your search: [Ctrl + c to quit]
- fka twigs magdalene
```
Now choose whatever releases you want to download. Everything else is interactive. Enjoy.
Run `qobuz-dl fun --help` for more info.
### Lucky mode ### Lucky mode
Download the first album result Download the first album result
``` ```

View File

@ -1,4 +1,5 @@
import argparse import argparse
import base64
import configparser import configparser
import os import os
import re import re
@ -27,7 +28,9 @@ def reset_config(config_file):
print("Creating config file: " + config_file) print("Creating config file: " + config_file)
config = configparser.ConfigParser() config = configparser.ConfigParser()
config["DEFAULT"]["email"] = input("\nEnter your email:\n- ") config["DEFAULT"]["email"] = input("\nEnter your email:\n- ")
config["DEFAULT"]["password"] = input("\nEnter your password\n- ") config["DEFAULT"]["password"] = base64.b64encode(
input("\nEnter your password\n- ").encode()
).decode()
config["DEFAULT"]["default_folder"] = ( config["DEFAULT"]["default_folder"] = (
input("\nFolder for downloads (leave empy for default 'Qobuz Downloads')\n- ") input("\nFolder for downloads (leave empy for default 'Qobuz Downloads')\n- ")
or "Qobuz Downloads" or "Qobuz Downloads"
@ -252,7 +255,7 @@ def main():
try: try:
email = config["DEFAULT"]["email"] email = config["DEFAULT"]["email"]
password = config["DEFAULT"]["password"] password = base64.b64decode(config["DEFAULT"]["password"]).decode()
default_folder = config["DEFAULT"]["default_folder"] default_folder = config["DEFAULT"]["default_folder"]
default_limit = config["DEFAULT"]["default_limit"] default_limit = config["DEFAULT"]["default_limit"]
default_quality = config["DEFAULT"]["default_quality"] default_quality = config["DEFAULT"]["default_quality"]
@ -263,7 +266,7 @@ def main():
arguments = qobuz_dl_args( arguments = qobuz_dl_args(
default_quality, default_limit, default_folder default_quality, default_limit, default_folder
).parse_args() ).parse_args()
except KeyError: except (KeyError, UnicodeDecodeError):
arguments = qobuz_dl_args().parse_args() arguments = qobuz_dl_args().parse_args()
if not arguments.reset: if not arguments.reset:
print("Your config file is corrupted! Run 'qobuz-dl -r' to fix this\n") print("Your config file is corrupted! Run 'qobuz-dl -r' to fix this\n")

View File

@ -15,7 +15,7 @@ if os.name == "nt":
setup( setup(
name=pkg_name, name=pkg_name,
version="0.5.1", version="0.5.2",
author="Vitiko", author="Vitiko",
author_email="vhnz98@gmail.com", author_email="vhnz98@gmail.com",
description="The complete Lossless and Hi-Res music downloader for Qobuz", description="The complete Lossless and Hi-Res music downloader for Qobuz",