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