]> jfr.im git - yt-dlp.git/commitdiff
Fix archive bug introduced in 8b0d7497d536b93610d469b6e3fd2935fb3cb8a0
authorpukkandan <redacted>
Wed, 13 Jan 2021 15:24:13 +0000 (20:54 +0530)
committerpukkandan <redacted>
Wed, 13 Jan 2021 15:33:50 +0000 (21:03 +0530)
youtube_dlc/YoutubeDL.py

index dadf500c4d30bd1f63165876cda709881c47e3b7..5141159d27051609c37c2cc953c0fc7633c2ba19 100644 (file)
@@ -842,9 +842,9 @@ def check_filter():
         reason = check_filter()
         if reason is not None:
             self.to_screen('[download] ' + reason)
-            if reason.endswith('has already been recorded in the archive') and self.params.get('break_on_existing'):
+            if reason.endswith('has already been recorded in the archive') and self.params.get('break_on_existing', False):
                 raise ExistingVideoReached()
-            elif self.params.get('break_on_reject'):
+            elif self.params.get('break_on_reject', False):
                 raise RejectedVideoReached()
         return reason
 
@@ -1110,7 +1110,8 @@ def report_download(num_entries):
                     'extractor_key': ie_result['extractor_key'],
                 }
 
-                self._match_entry(entry, incomplete=True)
+                if self._match_entry(entry, incomplete=True) is not None:
+                    continue
 
                 entry_result = self.__process_iterable_entry(entry, download, extra)
                 # TODO: skip failed (empty) entries?
@@ -2266,10 +2267,10 @@ def download(self, url_list):
                 self.to_screen('[info] Maximum number of downloaded files reached')
                 raise
             except ExistingVideoReached:
-                self.to_screen('[info] Encountered a file that did not match filter, stopping due to --break-on-reject')
+                self.to_screen('[info] Encountered a file that is already in the archive, stopping due to --break-on-existing')
                 raise
             except RejectedVideoReached:
-                self.to_screen('[info] Encountered a file that is already in the archive, stopping due to --break-on-existing')
+                self.to_screen('[info] Encountered a file that did not match filter, stopping due to --break-on-reject')
                 raise
             else:
                 if self.params.get('dump_single_json', False):