1
0
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:
Mike Fährmann 2018-11-13 18:06:36 +01:00
parent 14ee6bf611
commit 8ef84a6823
No known key found for this signature in database
GPG Key ID: 5680CA389D365A88
2 changed files with 11 additions and 1 deletions

View File

@ -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
-----------------------
=========== =====

View File

@ -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