diff --git a/gallery_dl/downloader/http.py b/gallery_dl/downloader/http.py index fddd32d..d0d3815 100644 --- a/gallery_dl/downloader/http.py +++ b/gallery_dl/downloader/http.py @@ -27,7 +27,7 @@ class HttpDownloader(DownloaderBase): self.adjust_extension = self.config("adjust-extensions", True) self.chunk_size = self.config("chunk-size", 32768) - self.metadata = extractor.config("http-metadata") + self.metadata = extractor.config2("metadata-http", "http-metadata") self.progress = self.config("progress", 3.0) self.validate = self.config("validate", True) self.validate_html = self.config("validate-html", True) diff --git a/test/test_downloader.py b/test/test_downloader.py index b2e6e21..7201996 100644 --- a/test/test_downloader.py +++ b/test/test_downloader.py @@ -166,6 +166,16 @@ class TestDownloaderConfig(unittest.TestCase): self.assertEqual(dl.rate(), 42) self.assertEqual(dl.part, False) + def test_config_http_metadata(self): + for key in ("metadata-http", "http-metadata"): + config.clear() + config.set((), key, "gdl_http") + + job = FakeJob() + dl = downloader.find("http")(job) + + self.assertEqual(dl.metadata, "gdl_http", key) + class TestDownloaderBase(unittest.TestCase):