@@ -160,10 +160,10 @@ def get_downloaded(downloaded_path: str, platform: str) -> tuple[dict[str, list[
160
160
return downloaded_list , downloaded_file
161
161
162
162
163
- def download (output_path : str , manifest_list : list [tuple [str , str ]], downloaded_list : dict , downloaded_file : TextIOWrapper , platform : str ):
163
+ def download (output_basepath : str , manifest_list : list [tuple [str , str ]], downloaded_list : dict , downloaded_file : TextIOWrapper , platform : str ):
164
164
main_logger = logging .getLogger (__name__ )
165
- if not os .access (output_path , os .W_OK ):
166
- main_logger .error (f"can't write to directory { output_path } " )
165
+ if not os .access (output_basepath , os .W_OK ):
166
+ main_logger .error (f"can't write to directory { output_basepath } " )
167
167
exit (1 )
168
168
else :
169
169
ydl_opts = {
@@ -174,7 +174,7 @@ def download(output_path: str, manifest_list: list[tuple[str, str]], downloaded_
174
174
}
175
175
for (filename , manifest ) in manifest_list :
176
176
if manifest not in downloaded_list [platform ]:
177
- output_path = os .path .join (output_path , filename )
177
+ output_path = os .path .join (output_basepath , filename )
178
178
ydl_opts ["outtmpl" ] = output_path + ".%(ext)s"
179
179
main_logger .info (f"Downloading { filename } " )
180
180
with youtube_dl .YoutubeDL (ydl_opts ) as ydl :
0 commit comments