avans06 commited on
Commit
5b0aac0
1 Parent(s): 35f051a

Add the "ignoreerrors" option to ydl_opts in download.py.

Browse files

When a download error occurs, it will attempt to read the next file instead of forcing termination. This is particularly useful when the input YouTube URL is of playlist type (&list=XXX).

Files changed (1) hide show
  1. src/download.py +2 -1
src/download.py CHANGED
@@ -32,7 +32,8 @@ def _perform_download(url: str, maxDuration: int = None, outputTemplate: str = N
32
  "format": "bestaudio/best" if onlyAudio else "bestvideo[ext=mp4][vcodec^=avc1]+bestaudio[ext=m4a]/best",
33
  'paths': {
34
  'home': destinationDirectory
35
- }
 
36
  }
37
  if (playlistItems):
38
  ydl_opts['playlist_items'] = playlistItems
 
32
  "format": "bestaudio/best" if onlyAudio else "bestvideo[ext=mp4][vcodec^=avc1]+bestaudio[ext=m4a]/best",
33
  'paths': {
34
  'home': destinationDirectory
35
+ },
36
+ "ignoreerrors": True
37
  }
38
  if (playlistItems):
39
  ydl_opts['playlist_items'] = playlistItems