Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow removing fragments for incomplete HLS downloads (was: hls fragment downloader does not clean up after itself) #9512

Closed
RealDolos opened this issue May 16, 2016 · 2 comments

Comments

@RealDolos
Copy link

@RealDolos RealDolos commented May 16, 2016

  • I've verified and I assure that I'm running youtube-dl 2016.05.10
  • At least skimmed through README and most notably FAQ and BUGS sections
  • Searched the bugtracker for similar issues including closed ones

What is the purpose of your issue?

  • Bug report (encountered problems with youtube-dl)
  • Site support request (request for adding support for a new site)
  • Feature request (request for a new functionality)
  • Question
  • Other

Not sure if it counts as a bug or a feature request, to me it is a small annoyance tho.

youtube-dl may download tons of fragments via the hls dowloader to individual files.
https://github.com/rg3/youtube-dl/blob/master/youtube_dl/downloader/hls.py#L74-L88

If there is an unrecoverable error, e.g. when a stream is removed, then these files will never get removed; they are only ever removed once all fragments have been retrieved successfully, which will never happen once the stream is gone, no matter how hard one tries to resume.

To fix this properly, there needs to be a distinction between unrecoverable errors (e.g. stream is gone) and recoverable errors (e.g. user aborted, but may resume later).
And maybe even an option to remove fragment files always.

Since I personally use youtube-dl in an automated fashion, my local fix does not have to deal potentially resuming later, so I just moved the os.remove-loop into a finally.

@yan12125
Copy link
Collaborator

@yan12125 yan12125 commented May 26, 2016

These files are kept in failure for restarting the download. I guess it's OK to always delete these files if --no-continue is specified.

@yan12125 yan12125 changed the title hls fragment downloader does not clean up after itself Allow removing fragments for incomplete HLS downloads (was: hls fragment downloader does not clean up after itself) May 26, 2016
@dstftw
Copy link
Collaborator

@dstftw dstftw commented Apr 26, 2017

This is not actual now since fragments are not stored on disk anymore.

@dstftw dstftw closed this Apr 26, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
3 participants
You can’t perform that action at this time.