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
Add --yes-overwrites option #20405
Add --yes-overwrites option #20405
Conversation
@dstftw or @remitamine as it seems you're the main developers on this project, I'd be really glad to receive some feedback from you on this. |
I definitely won't accept current solution as it breaks the default behavior. Media files are considered big files and should not be overwritten until explicitly told to do so. I also won't accept What I probably will accept is extending overwrites options to:
Everything should be covered with tests. |
Until this essential command is added, could someone inform me: |
489b2ac
to
2cb556e
Compare
As suggested by @dstftw, I added a new
(❌: no overwrite; ✔️: overwrite) |
Can this change be implemented ? It would greatly help. Thanks. |
I was also looking for such a feature too right now, I downloaded 720p, but I decided to use 1080p quality with another command, but I have to go navigate to the disk to delete it manually. I do understand that it's better to be safe and not overwrite by accident, but in such a case where I know I don't need the old version and I'm really sure then why not have such an option. Thanks |
Yes, it's good to know YTDL will never over-write. Those of us who use YTDL in our projects just have to build our own code to find duplicates and ask the user what to do. Challenge for me has been working out exactly what YTDL does. |
42ada3f
to
73975ec
Compare
@dstftw Implemented as you suggested and added a test. Please review. Thanks! |
5e26784
to
da2069f
Compare
I just tested this and sadly, it doesn't work -- "no such option" with the latest update, 2020.09.20. ============ youtube-dl: error: no such option: --yes-overwritesI hope this is helpful. |
@subirax Remember this Pull Request it isn't merged into the code yet, so you need to apply the patch before compiling/testing. |
Hello I have last version and "--yes-overwrites" doesn't work, is it possible to fix it or something ? |
@Arnauw As stated above, this is still open, it's not merged yet, it's not part of youtube-dl yet, you would need to compile it with this patch yourself in the meantime while it gets all the tests/checks done to get in. |
@altimumdelta Ok thanks ;) |
Co-authored by alxnull
The exe for Windows downloaded today youtube-dl version 2021.06.06 gives the same error.. |
Is this PR still active? Was considering coding a PR to do the same thing but this one looks like it would fulfill my use case. |
Before submitting a pull request make sure you have:
In order to be accepted and merged into youtube-dl each piece of code must be in public domain or released under Unlicense. Check one of the following options:
What is the purpose of your pull request?
Description of your pull request and other information
Edit: Resolves #23034.
Currently, if a file with the same name already exists, the download of a video ends with this message, saying it's been downloaded already (be aware that this behaviour does not change by adding the
--no-continue
flag):However, to my understanding, without the
--no-overwrites
flag which explicitly enforces such behaviour, all downloaded files should be overwritten (thus redownloaded). That's already the case e.g. for info jsons, video descriptions or subtitles but not for video files themselves.If this is an unwanted behaviour, I could add an optional flag (
--force-overwrites
) to implement it solely for video files. I currently did not do that because I think it would make the available options more confusing.(This issue was raised e.g. in #14031 a while ago)