chandler-stimson / live-stream-downloader

Download M3U8 live streams to the local disk
https://webextension.org/listing/hls-downloader.html
223 stars 74 forks source link

resume a broken download without starting from scratch #37

Open gitjuggs opened 1 year ago

gitjuggs commented 1 year ago

if a download fails and you must redownload the file manually again the new download starts from scratch and the old already partially downloaded file is overwritten.

it would be great if the new download could resume where the old download stopped.

it would be also great if there was a button in the download window which you just need to press so that the file is downloaded again.

maybe the download could be even restarted automatically when the extension has decided that the download has failed.

cocoloco111 commented 1 year ago

[ldg

vertigo220 commented 1 month ago

The lack of this, combined with the frequency of the "Connection to the server is broken (BROKEN_PIPE -> PIPE_SIZE_MISMATCH)!" error that I get all the time and that's commonly reported in the reviews for this extension, makes this extension frustrating to use and a waste of bandwidth, as I often have to attempt to download something multiple times, wasting 10s if not 100s of MBs of data.

This is especially ironic considering the info page states "Because the extension supports resuming broken network connections and uses multiple threads to download files, it is recommended to use it over the default download manager when downloading large files or when your network is unstable." I find this extension to be far more unstable than the built-in downloader, and far less able to resume. Sometimes, if I catch it immediately and hit retry, it will continue, but then I have to sit there for however long it takes (once I had to watch it for close to an hour doing it probably >20 times per file on a few files) and keep hitting retry as soon as it fails. If I don't, then even after I hit it once, twice, however many times, it will just fail again, and if I'm not there to hit retry yet again, it will just fail, and then it can't be resumed. Meanwhile, using the built-in downloader, not only does it fail much less often, but even if it's been hours, I can resume it.

Because of this, I use the built-in one whenever I can. Unfortunately, I have to use this for streams, and so I have to just hope it will work, and waste a lot of time and data when it fails. Perhaps it struggles more because of working with streams vs regular files (which is where I can, and do, use the built in downloader). Still, contrary to the claims, I find it to be extremely unstable, and looking at reviews it seems I'm far from alone. At the very least, it would be nice if it could automatically retry, as it seems that might be enough to keep it going. But ideally whatever is causing the broken pipe error should be fixed and resuming should be improved.

Unfortunately, there are no logs that I'm aware of, so I can't really provide any debugging info. And it's erratic enough that it's not as simple as saying this site or that link.

chandler-stimson commented 1 month ago

The extension automatically attempts to repair broken pipes, except when encountering unfixable errors. The "PIPE_SIZE_MISMATCH" error occurs when a pipe (a segment of the final file) reports a size inconsistent with the actual final size. In such cases, the extension cannot resolve the issue .

If you encounter this problem repeatedly with a specific link, please provide an example. This would allow me to reproduce the issue and work on a solution.

vertigo220 commented 1 month ago

If it's an issue with a single segment, could it just re-download that segment instead of the entire download failing, sometimes after 10s or 100s of MBs are downloaded?