mirror of
https://github.com/Wojtek242/qobuz-dl.git
synced 2024-12-22 23:34:40 +01:00
Fix broken interactive mode from PR; style
This commit is contained in:
parent
5eaabfc55b
commit
2f63df8c0b
16
main.py
16
main.py
@ -138,14 +138,14 @@ def interactive(Qz, path, limit, tracks=True):
|
||||
else:
|
||||
break
|
||||
|
||||
if len(Albums) > 0:
|
||||
desc = (
|
||||
"Select [intro] the quality (the quality will be automat"
|
||||
"ically\ndowngraded if the selected is not found)"
|
||||
)
|
||||
Qualits = ["320", "Lossless", "Hi-res =< 96kHz", "Hi-Res > 96 kHz"]
|
||||
quality = pick(Qualits, desc, default_index=1)
|
||||
processSelected(Qz, path, Albums, IDs, Types, quality)
|
||||
if len(Albums) > 0:
|
||||
desc = (
|
||||
"Select [intro] the quality (the quality will be automat"
|
||||
"ically\ndowngraded if the selected is not found)"
|
||||
)
|
||||
Qualits = ["320", "Lossless", "Hi-res =< 96kHz", "Hi-Res > 96 kHz"]
|
||||
quality = pick(Qualits, desc, default_index=1)
|
||||
processSelected(Qz, path, Albums, IDs, Types, quality)
|
||||
except KeyboardInterrupt:
|
||||
sys.exit("\nBye")
|
||||
|
||||
|
@ -33,7 +33,7 @@ def mkDir(dirn):
|
||||
def getDesc(u, mt):
|
||||
return "{}{} [{}/{}]".format(
|
||||
mt["title"],
|
||||
" (" + mt["version"] + ")" if mt["version"] is not None else "",
|
||||
(" (" + mt["version"] + ")") if mt["version"] else "",
|
||||
u["bit_depth"],
|
||||
u["sampling_rate"],
|
||||
)
|
||||
@ -70,13 +70,13 @@ def iterateIDs(client, id, path, quality, album=False):
|
||||
print(
|
||||
"\nDownloading: {0} {1}\n".format(
|
||||
meta["title"],
|
||||
"(" + meta["version"] + ")" if meta["version"] is not None else " ",
|
||||
("(" + meta["version"] + ")") if meta["version"] else " ",
|
||||
)
|
||||
)
|
||||
dirT = (
|
||||
meta["artist"]["name"],
|
||||
meta["title"],
|
||||
" " + meta["version"] if meta["version"] is not None else "",
|
||||
(" " + meta["version"]) if meta["version"] else "",
|
||||
meta["release_date_original"].split("-")[0],
|
||||
)
|
||||
sanitized_title = sanitize_filename("{} - {}{} [{}]".format(*dirT)) # aa-{}
|
||||
@ -107,15 +107,13 @@ def iterateIDs(client, id, path, quality, album=False):
|
||||
print(
|
||||
"\nDownloading: {0} {1}\n".format(
|
||||
meta["title"],
|
||||
"(" + meta["version"] + ")" if meta["version"] is not None else " ",
|
||||
("(" + meta["version"] + ")") if meta["version"] else " ",
|
||||
)
|
||||
)
|
||||
dirT = (
|
||||
meta["album"]["artist"]["name"],
|
||||
meta["album"]["title"],
|
||||
" " + meta["album"]["version"]
|
||||
if meta["album"]["version"] is not None
|
||||
else "",
|
||||
(" " + meta["album"]["version"]) if meta["album"]["version"] else "",
|
||||
meta["album"]["release_date_original"].split("-")[0],
|
||||
)
|
||||
sanitized_title = sanitize_filename("{} - {}{} [{}]".format(*dirT))
|
||||
|
Loading…
Reference in New Issue
Block a user