mirror of
https://github.com/saveweb/biliarchiver.git
synced 2024-09-19 11:05:28 -07:00
跳过本地已完整下载的视频,避免为其创建耗时的 async task
This commit is contained in:
parent
07060e7226
commit
595214e37b
@ -151,6 +151,13 @@ def _main():
|
||||
print(f'IA 上已存在 {remote_identifier} ,跳过')
|
||||
continue
|
||||
|
||||
|
||||
upper_part = human_readable_upper_part_map(string=bvid, backward=True)
|
||||
videos_basepath: Path = config.storage_home_dir / 'videos' / f'{bvid}-{upper_part}'
|
||||
if os.path.exists(videos_basepath / '_all_downloaded.mark'):
|
||||
print(f'{bvid} 所有分p都已下载过了')
|
||||
continue
|
||||
|
||||
if len(tasks) >= config.video_concurrency:
|
||||
loop.run_until_complete(asyncio.wait(tasks, return_when=asyncio.FIRST_COMPLETED))
|
||||
tasks_check()
|
||||
|
Loading…
Reference in New Issue
Block a user