1
0
mirror of https://github.com/mikf/gallery-dl.git synced 2024-11-22 18:53:21 +01:00

[downloader:http] change log message level to 'debug'

This commit is contained in:
Mike Fährmann 2019-08-29 23:05:47 +02:00
parent efb64ad031
commit 8eaae58045
No known key found for this signature in database
GPG Key ID: 5680CA389D365A88

View File

@ -38,11 +38,12 @@ class HttpDownloader(DownloaderBase):
if self.retries < 0:
self.retries = float("inf")
if self.rate:
self.rate = text.parse_bytes(self.rate)
if not self.rate:
self.log.warning("Invalid rate limit specified")
elif self.rate < self.chunk_size:
self.chunk_size = self.rate
rate = text.parse_bytes(self.rate)
if not rate:
self.log.warning("Invalid rate limit (%r)", self.rate)
elif rate < self.chunk_size:
self.chunk_size = rate
self.rate = rate
def download(self, url, pathfmt):
try:
@ -124,10 +125,10 @@ class HttpDownloader(DownloaderBase):
if not offset:
mode = "w+b"
if filesize:
self.log.info("Unable to resume partial download")
self.log.debug("Unable to resume partial download")
else:
mode = "r+b"
self.log.info("Resuming download at byte %d", offset)
self.log.debug("Resuming download at byte %d", offset)
# start downloading
self.out.start(pathfmt.path)