about summary refs log tree commit diff
path: root/youtube_dl/downloader
diff options
context:
space:
mode:
authordirkf <fieldhouse@gmx.net>2023-03-19 00:51:44 +0000
committerdirkf <fieldhouse@gmx.net>2023-03-19 02:15:41 +0000
commit45495228b7a6728b7e764bbcf1f38490cd3d8697 (patch)
treedf97d1e937822ed50520814809830c88260d3bf4 /youtube_dl/downloader
parent6fece0a96b3cd8677f5c1185a57c6e21403fcb44 (diff)
downloadyoutube-dl-45495228b7a6728b7e764bbcf1f38490cd3d8697.tar.gz
youtube-dl-45495228b7a6728b7e764bbcf1f38490cd3d8697.tar.xz
youtube-dl-45495228b7a6728b7e764bbcf1f38490cd3d8697.zip
[downloader/http] Only check for resumability when actually resuming
Diffstat (limited to 'youtube_dl/downloader')
-rw-r--r--youtube_dl/downloader/http.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/youtube_dl/downloader/http.py b/youtube_dl/downloader/http.py
index 440471aa0..28a49b9e8 100644
--- a/youtube_dl/downloader/http.py
+++ b/youtube_dl/downloader/http.py
@@ -141,7 +141,8 @@ class HttpFD(FileDownloader):
                     # Content-Range is either not present or invalid. Assuming remote webserver is
                     # trying to send the whole file, resume is not possible, so wiping the local file
                     # and performing entire redownload
-                    self.report_unable_to_resume()
+                    if range_start > 0:
+                        self.report_unable_to_resume()
                     ctx.resume_len = 0
                     ctx.open_mode = 'wb'
                 ctx.data_len = int_or_none(ctx.data.info().get('Content-length', None))