hopefully fixed timeout in musify
This commit is contained in:
parent
8b9e62cc8a
commit
f6362fda5d
@ -147,8 +147,11 @@ class Musify(AudioSource):
|
||||
# download the audio data
|
||||
logger.info(f"downloading: '{url}'")
|
||||
try:
|
||||
r = session.get(url, timeout=15)
|
||||
except requests.exceptions.ConnectionError or requests.exceptions.ReadTimeout:
|
||||
r = session.get(url, timeout=TIMEOUT)
|
||||
except requests.exceptions.ConnectionError:
|
||||
return False
|
||||
except requests.exceptions.ReadTimeout:
|
||||
logger.warning(f"musify server didn't respond after {TIMEOUT} seconds")
|
||||
return False
|
||||
if r.status_code != 200:
|
||||
if r.status_code == 404:
|
||||
|
Loading…
Reference in New Issue
Block a user