mirror of
https://github.com/mikf/gallery-dl.git
synced 2024-11-22 02:32:33 +01:00
add option to enable/disable specific downloader modules
... and write URLs with no (active) downloader to unsupported-file
This commit is contained in:
parent
14ee6bf611
commit
8ef84a6823
@ -838,6 +838,15 @@ Description Certificate validation during file downloads.
|
||||
=========== =====
|
||||
|
||||
|
||||
downloader.*.enable
|
||||
-------------------
|
||||
=========== =====
|
||||
Type ``bool``
|
||||
Default ``true``
|
||||
Description Enable/Disable this downloader module.
|
||||
=========== =====
|
||||
|
||||
|
||||
downloader.ytdl.logging
|
||||
-----------------------
|
||||
=========== =====
|
||||
|
@ -259,6 +259,7 @@ class DownloadJob(Job):
|
||||
downloader = self.get_downloader(scheme)
|
||||
if downloader:
|
||||
return downloader.download(url, self.pathfmt)
|
||||
self._write_unsupported(url)
|
||||
return False
|
||||
|
||||
def get_downloader(self, scheme):
|
||||
@ -271,7 +272,7 @@ class DownloadJob(Job):
|
||||
pass
|
||||
|
||||
klass = downloader.find(scheme)
|
||||
if klass:
|
||||
if klass and config.get(("downloader", scheme, "enable"), True):
|
||||
instance = klass(self.extractor, self.out)
|
||||
else:
|
||||
instance = None
|
||||
|
Loading…
Reference in New Issue
Block a user