Improve resuming interrupted download when using yt-dlp or youtube-dl
authorJoey Hess <joeyh@joeyh.name>
Mon, 19 Jun 2023 19:01:47 +0000 (15:01 -0400)
committerJoey Hess <joeyh@joeyh.name>
Mon, 19 Jun 2023 19:01:47 +0000 (15:01 -0400)
commit958c2fa6d261941e024a2169ce82f8e870038ca4
treec1edbebb2b99b00bcc667c304ac3f2a310df5913
parenta36a81dea388eee1ba721e38e3be9843581f92f4
Improve resuming interrupted download when using yt-dlp or youtube-dl

Fixes a failure like this:

curl: (33) HTTP server doesn't seem to support byte ranges. Cannot resume.

That happens because the whole web page has already been downloaded
previously, and kept, so now addurl tries to download it, and curl asks the
server to resume from the last byte. And youtube.com can't, for whatever
stupid reason.

So, delete the temp file after determining that youtube-dl can be used.
CHANGELOG
Command/AddUrl.hs