mirror of
https://github.com/Wojtek242/qobuz-dl.git
synced 2024-12-22 15:24:40 +01:00
Fix for #16
This commit is contained in:
parent
78d9275579
commit
9af672df42
37
README.md
37
README.md
@ -38,24 +38,6 @@ qobuz-dl.exe
|
||||
> If something fails, run `qobuz-dl -r` to reset your config file.
|
||||
|
||||
## 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 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.
|
||||
|
||||
### 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
|
||||
Download the first album result
|
||||
```
|
||||
|
@ -1,4 +1,5 @@
|
||||
import argparse
|
||||
import base64
|
||||
import configparser
|
||||
import os
|
||||
import re
|
||||
@ -27,7 +28,9 @@ def reset_config(config_file):
|
||||
print("Creating config file: " + config_file)
|
||||
config = configparser.ConfigParser()
|
||||
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"] = (
|
||||
input("\nFolder for downloads (leave empy for default 'Qobuz Downloads')\n- ")
|
||||
or "Qobuz Downloads"
|
||||
@ -252,7 +255,7 @@ def main():
|
||||
|
||||
try:
|
||||
email = config["DEFAULT"]["email"]
|
||||
password = config["DEFAULT"]["password"]
|
||||
password = base64.b64decode(config["DEFAULT"]["password"]).decode()
|
||||
default_folder = config["DEFAULT"]["default_folder"]
|
||||
default_limit = config["DEFAULT"]["default_limit"]
|
||||
default_quality = config["DEFAULT"]["default_quality"]
|
||||
@ -263,7 +266,7 @@ def main():
|
||||
arguments = qobuz_dl_args(
|
||||
default_quality, default_limit, default_folder
|
||||
).parse_args()
|
||||
except KeyError:
|
||||
except (KeyError, UnicodeDecodeError):
|
||||
arguments = qobuz_dl_args().parse_args()
|
||||
if not arguments.reset:
|
||||
print("Your config file is corrupted! Run 'qobuz-dl -r' to fix this\n")
|
||||
|
Loading…
Reference in New Issue
Block a user