fix bug of downloading coverswq
@@ -397,6 +397,7 @@ def convert_cover_url_to_path(cover_url):
return dir_path, file_path
+
@log_utils_function
def download_file(url):
if url.startswith('https://') or url.startswith('http://'):
@@ -416,6 +417,9 @@ def download_cover(cover_url_list):
p = ThreadPool(4)
content_list = p.map(download_file, cover_url_list)
for index, r in enumerate(content_list):
+ if not r:
+ continue
+
dir_path, file_path = convert_cover_url_to_path(cover_url_list[index])
if not glob.glob(dir_path):
os.makedirs(dir_path)
