Added an additional channel for downloading the metadata of an entire post or gallery.
This commit is contained in:
@@ -97,6 +97,12 @@ class Job():
|
||||
self.update_kwdict(kwds)
|
||||
self.handle_urllist(urls, kwds)
|
||||
|
||||
elif msg[0] == Message.Metadata:
|
||||
_, url, kwds = msg
|
||||
if self.pred_url(url, kwds):
|
||||
self.update_kwdict(kwds)
|
||||
self.handle_url(url, kwds)
|
||||
|
||||
elif msg[0] == Message.Version:
|
||||
if msg[1] != 1:
|
||||
raise "unsupported message-version ({}, {})".format(
|
||||
@@ -188,6 +194,10 @@ class DownloadJob(Job):
|
||||
for pp in postprocessors:
|
||||
pp.prepare(pathfmt)
|
||||
|
||||
if kwdict.get("metadata_only"):
|
||||
self.handle_skip()
|
||||
return
|
||||
|
||||
if pathfmt.exists(archive):
|
||||
self.handle_skip()
|
||||
return
|
||||
|
||||
Reference in New Issue
Block a user