mirror of
https://github.com/nathom/streamrip.git
synced 2025-05-13 06:34:45 -04:00
Use asynchronous requests for QobuzClient startup/login
This commit is contained in:
parent
e9f40923ba
commit
6e0731ed0b
4 changed files with 54 additions and 36 deletions
17
rip/cli.py
17
rip/cli.py
|
@ -46,6 +46,7 @@ class DownloadCommand(Command):
|
|||
|
||||
# Use a thread so that it doesn't slow down startup
|
||||
update_check = threading.Thread(target=is_outdated, daemon=True)
|
||||
update_check.start()
|
||||
|
||||
config = Config()
|
||||
path, codec, quality, no_db = clean_options(
|
||||
|
@ -83,16 +84,12 @@ class DownloadCommand(Command):
|
|||
elif not urls and path is None:
|
||||
self.line("<error>Must pass arguments. See </><cmd>rip url -h</cmd>.")
|
||||
|
||||
try:
|
||||
update_check.join()
|
||||
if outdated:
|
||||
self.line(
|
||||
"<info>A new version of streamrip is available! Run</info> "
|
||||
"<cmd>pip3 install streamrip --upgrade to update</cmd>"
|
||||
)
|
||||
except RuntimeError as e:
|
||||
logger.debug("Update check error: %s", e)
|
||||
pass
|
||||
update_check.join()
|
||||
if outdated:
|
||||
self.line(
|
||||
"<info>A new version of streamrip is available! Run</info> "
|
||||
"<cmd>pip3 install streamrip --upgrade to update</cmd>"
|
||||
)
|
||||
|
||||
return 0
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue