Mods update
* Fixed notifications not working in mod_chat_sanitizer (in violent sanitization) * Increased default timeouts for _get_all_quantites and _download_video (mod_video_downloader)
This commit is contained in:
@@ -98,14 +98,14 @@ def _get_all_qualities_raw(url: str, proxy: bool, timeout: float = 20) -> dict |
|
||||
except:
|
||||
return traceback.format_exc()
|
||||
|
||||
async def _get_all_qualities(url: str, proxy: bool, timeout: float = 20) -> dict | str:
|
||||
async def _get_all_qualities(url: str, proxy: bool, timeout: float = 60) -> dict | str:
|
||||
''' Async version '''
|
||||
try:
|
||||
return await asyncio.to_thread(_get_all_qualities_raw, url, proxy, timeout)
|
||||
except:
|
||||
return traceback.format_exc()
|
||||
|
||||
def _download_video_raw(url: str, quality_code : str, path: str, proxy: bool, timeout: float = 20) -> str | bool:
|
||||
def _download_video_raw(url: str, quality_code : str, path: str, proxy: bool, timeout: float = 60) -> str | bool:
|
||||
''' Download video from URL, use quality code to get info from cache '''
|
||||
try:
|
||||
# no such quality cached
|
||||
@@ -175,7 +175,7 @@ def _download_video_raw(url: str, quality_code : str, path: str, proxy: bool, ti
|
||||
except:
|
||||
return traceback.format_exc()
|
||||
|
||||
async def _download_video(url: str, quality_code : str, path: str, proxy: bool, timeout: float = 20) -> str | bool:
|
||||
async def _download_video(url: str, quality_code : str, path: str, proxy: bool, timeout: float = 60) -> str | bool:
|
||||
''' Async version '''
|
||||
try:
|
||||
return await asyncio.to_thread(_download_video_raw, url, quality_code, path, proxy, timeout)
|
||||
|
||||
Reference in New Issue
Block a user