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

Download and extract to temporary directory, then move final output file #23206

Closed
chrisgraham opened this issue Nov 25, 2019 · 1 comment
Closed
Labels

Comments

@chrisgraham
Copy link

@chrisgraham chrisgraham commented Nov 25, 2019

Checklist

  • I'm reporting a feature request
  • I've verified that I'm running youtube-dl version 2019.11.22
  • I've searched the bugtracker for similar feature requests including closed ones

Description

My understanding is that youtube-dl will create temporary files (.part files), and video files (e.g. .webm files), in the current working directory - before concluding audio extraction and deleting those files.

Some music applications (e.g. RhythmBox) will listen for new media files in their music directory. This means it will pick up on a .webm file, then immediately report it missing. RhythmBox in particular then does not pick up on the .mp3, I'd guess because of it not being created atomically somehow - I have to restart, and it will then pick it up in a scan.

I suggest a new parameter that specifies that all files should be created in the system temporary directory, and then any files left over at the very end get moved into the current working directory.
This ensures no temporary files will be picked up, and that everything is atomic from the point of view of the final file path.

@chrisgraham chrisgraham added the request label Nov 25, 2019
@dstftw
Copy link
Collaborator

@dstftw dstftw commented Nov 25, 2019

  1. Setup output template.
  2. Use --exec to move files.
@dstftw dstftw closed this Nov 25, 2019
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
2 participants
You can’t perform that action at this time.