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

Trash original files #15046

Closed
PhilipDukhov opened this issue Dec 21, 2017 · 4 comments
Closed

Trash original files #15046

PhilipDukhov opened this issue Dec 21, 2017 · 4 comments

Comments

@PhilipDukhov
Copy link

@PhilipDukhov PhilipDukhov commented Dec 21, 2017

As I know there's an option "-k" to keep original files, and without this option - files are removed completly. But it will be very comfortably for me if files are moved to the trash, so I can restore them just if I need, not all the time. Usualy I think that that's be great to keep it after it's removed already.

@sleske
Copy link
Contributor

@sleske sleske commented Dec 22, 2017

Interesting idea. However, that might be a bit tricky because "moving to trash" works differently on different platforms. We should probably use an external library. Send2Trash ( https://pypi.python.org/pypi/Send2Trash ) looks good, however it does not support Python 2.6.

@sleske
Copy link
Contributor

@sleske sleske commented Dec 22, 2017

At any rate, I'm not sure this is really worth implementing.

Most users will just delete the original videos (that is why "-k" / "--keep-video" is not the default), and the original video files are often in unusual formats, so not terribly useful for most people. I think "-k" is mostly an option either for advanced users, who want to do their own custom post-processing, or for debugging of youtube-dl. So I don't think a lot of people would have a use for keeping the files but moving them to trash.

In addition to that, video files tend to be fairly large, so moving them to trash may quickly fill up available storage space, meaning this option could actually cause problems if used inadvertently.

All in all, I personally think this is not really worth implementing. Or are there use cases I forgot?

@Hrxn
Copy link

@Hrxn Hrxn commented Dec 22, 2017

No, I think you are right.

@yan12125
Copy link
Collaborator

@yan12125 yan12125 commented Dec 24, 2017

I don't think this feature is useful for many youtube-dl users, either. If you want to investigate possible approaches by yourself, check out the line that does the deletion:
https://github.com/rg3/youtube-dl/blob/3961c6cb9d3a1c30fe31db774b0809095952f1bd/youtube_dl/YoutubeDL.py#L2041

@yan12125 yan12125 closed this Dec 24, 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
4 participants
You can’t perform that action at this time.