Skip to content

Commit

Permalink
ensure '-s/--simulate' always prints filenames (#1360)
Browse files Browse the repository at this point in the history
by assuming a potentially wrong filename extension in cases where the
correct one would only get known after a download started
  • Loading branch information
mikf committed Mar 7, 2021
1 parent 83f465f commit b6719be
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion gallery_dl/job.py
Original file line number Diff line number Diff line change
Expand Up @@ -474,7 +474,9 @@ def _build_blacklist(self):
class SimulationJob(DownloadJob):
"""Simulate the extraction process without downloading anything"""

def handle_url(self, url, kwdict, fallback=None):
def handle_url(self, url, kwdict):
if not kwdict["extension"]:
kwdict["extension"] = "jpg"
self.pathfmt.set_filename(kwdict)
self.out.skip(self.pathfmt.path)
if self.sleep:
Expand Down

0 comments on commit b6719be

Please sign in to comment.