Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Set resume_len to 0 if download is restarted #2463

Merged
merged 1 commit into from

2 participants

@rzhxeo

If a download can't be resumed and is restarted, the download status messages are wrong because resume_len of the old overwritten file is added to data_len and byte_counter.

E.g.:

$ youtube-dl ...
[download]  10.1% of 54.55MiB at 99.34KiB/s ETA 08:25
ERROR: Interrupted by user

$ youtube-dl ...
[download] Unable to resume
[download]   8.7% of 58.98MiB at 60.64KiB/s ETA 15:09
@rzhxeo

I've added a better description of the problem to the pull request.

@phihag phihag merged commit fbcf3e4 into rg3:master
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Feb 26, 2014
  1. Set resume_len to 0 if download is restarted

    rzhxeo authored
This page is out of date. Refresh to see the latest.
Showing with 1 addition and 0 deletions.
  1. +1 −0  youtube_dl/downloader/http.py
View
1  youtube_dl/downloader/http.py
@@ -85,6 +85,7 @@ def real_download(self, filename, info_dict):
else:
# The length does not match, we start the download over
self.report_unable_to_resume()
+ resume_len = 0
open_mode = 'wb'
break
# Retry
Something went wrong with that request. Please try again.