Fixed bug in 2nd asyncio.wait_for
This commit is contained in:
parent
f0a538dad2
commit
31e6ed87e4
1 changed files with 20 additions and 18 deletions
|
|
@ -218,15 +218,15 @@ class DownloadQueue:
|
|||
already.add(url)
|
||||
try:
|
||||
LOG.debug(f'extracting info from {url=}')
|
||||
data = asyncio.get_running_loop().run_in_executor(
|
||||
None,
|
||||
ExtractInfo,
|
||||
mergeConfig(self.config.ytdl_options, ytdlp_config),
|
||||
url,
|
||||
bool(self.config.ytdl_debug)
|
||||
)
|
||||
|
||||
entry = await asyncio.wait_for(data, timeout=self.config.extract_info_timeout)
|
||||
entry = await asyncio.wait_for(
|
||||
fut=asyncio.get_running_loop().run_in_executor(
|
||||
None,
|
||||
ExtractInfo,
|
||||
mergeConfig(self.config.ytdl_options, ytdlp_config),
|
||||
url,
|
||||
bool(self.config.ytdl_debug)
|
||||
),
|
||||
timeout=self.config.extract_info_timeout)
|
||||
|
||||
if not entry:
|
||||
if not self.config.keep_archive:
|
||||
|
|
@ -236,16 +236,18 @@ class DownloadQueue:
|
|||
}
|
||||
|
||||
LOG.debug(f'No metadata, Rechecking with archive disabled. {url=}')
|
||||
data = await asyncio.get_running_loop().run_in_executor(
|
||||
None,
|
||||
ExtractInfo,
|
||||
mergeConfig(self.config.ytdl_options, ytdlp_config),
|
||||
url,
|
||||
bool(self.config.ytdl_debug),
|
||||
True
|
||||
|
||||
entry = await asyncio.wait_for(
|
||||
fut=asyncio.get_running_loop().run_in_executor(
|
||||
None,
|
||||
ExtractInfo,
|
||||
mergeConfig(self.config.ytdl_options, ytdlp_config),
|
||||
url,
|
||||
bool(self.config.ytdl_debug),
|
||||
True
|
||||
),
|
||||
timeout=self.config.extract_info_timeout
|
||||
)
|
||||
|
||||
entry = await asyncio.wait_for(data, timeout=self.config.extract_info_timeout)
|
||||
|
||||
if not entry:
|
||||
return {'status': 'error', 'msg': 'Unable to extract info check logs.'}
|
||||
|
|
|
|||
Loading…
Reference in a new issue