update PathFormat class
- change 'has_extension' from a simple flag/bool to a field that contains the original filename extension - rename 'keywords' to 'kwdict' and some other stuff as well - inline 'adjust_path()' - put enumeration index before filename extension (#306)
This commit is contained in:
@@ -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:
|
||||
@@ -364,7 +364,7 @@ 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)
|
||||
|
||||
Reference in New Issue
Block a user