diff options
| author | 2019-08-26 19:34:45 -0400 | |
|---|---|---|
| committer | 2019-08-26 19:34:45 -0400 | |
| commit | b75d158d014d6c43d7d785c46c9372a9cf84d144 (patch) | |
| tree | 7dca4a7e61fe8b6e2bff2142fc19891e783a7d6d /gallery_dl/job.py | |
| parent | 64ad8e7bd15df71ab1116eede414558631bcad32 (diff) | |
New upstream version 1.10.2upstream/1.10.2
Diffstat (limited to 'gallery_dl/job.py')
| -rw-r--r-- | gallery_dl/job.py | 20 |
1 files changed, 13 insertions, 7 deletions
diff --git a/gallery_dl/job.py b/gallery_dl/job.py index 637561a..6d81e66 100644 --- a/gallery_dl/job.py +++ b/gallery_dl/job.py @@ -196,7 +196,7 @@ class DownloadJob(Job): archive = self.archive # prepare download - pathfmt.set_keywords(keywords) + pathfmt.set_filename(keywords) if postprocessors: for pp in postprocessors: @@ -316,7 +316,9 @@ class DownloadJob(Job): skip = self.extractor.config("skip", True) if skip: self._skipexc = None - if isinstance(skip, str): + if skip == "enumerate": + self.pathfmt.check_file = self.pathfmt._enum_file + elif isinstance(skip, str): skip, _, smax = skip.partition(":") if skip == "abort": self._skipexc = exception.StopExtraction @@ -334,7 +336,8 @@ class DownloadJob(Job): postprocessors = self.extractor.config("postprocessors") if postprocessors: - self.postprocessors = [] + pp_list = [] + for pp_dict in postprocessors: whitelist = pp_dict.get("whitelist") blacklist = pp_dict.get("blacklist") @@ -353,16 +356,19 @@ class DownloadJob(Job): "'%s' initialization failed: %s: %s", name, exc.__class__.__name__, exc) else: - self.postprocessors.append(pp_obj) - self.extractor.log.debug( - "Active postprocessor modules: %s", self.postprocessors) + pp_list.append(pp_obj) + + if pp_list: + self.postprocessors = pp_list + self.extractor.log.debug( + "Active postprocessor modules: %s", pp_list) class SimulationJob(DownloadJob): """Simulate the extraction process without downloading anything""" def handle_url(self, url, keywords, fallback=None): - self.pathfmt.set_keywords(keywords) + self.pathfmt.set_filename(keywords) self.out.skip(self.pathfmt.path) if self.sleep: time.sleep(self.sleep) |
