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

Auto delete old files #358

Closed
abb0r opened this issue Mar 23, 2021 · 7 comments · Fixed by #809
Closed

Auto delete old files #358

abb0r opened this issue Mar 23, 2021 · 7 comments · Fixed by #809
Labels
is: enhancement New feature or extension of existing functionality
Milestone

Comments

@abb0r
Copy link

abb0r commented Mar 23, 2021

Hello,
There are some channels from which I don't want to keep every file forever. That's why an "auto delete" option would be quite useful. For example, you can specify that only uploads that are a maximum of 90 days old should be downloaded. If the uploaded video is older, it is automatically deleted. Is something like this possible?

@Tzahi12345
Copy link
Owner

Definitely possible! Would you want it to be per-subscription or a global setting?

@Tzahi12345 Tzahi12345 added the is: enhancement New feature or extension of existing functionality label Mar 28, 2021
@abb0r
Copy link
Author

abb0r commented Mar 28, 2021

I think per-subscription makes more sense, because with that you can have channel form which you want to keep all files and others form which you only want to keep files of the last 90 or so days.

@ibrahimk157
Copy link

This would also be nice for regular downloads.

For instance, having the application auto-delete everything that’s been downloaded more than 30 days ago.

This would be a great storage saver as those who use it to download the videos locally (myself included) won’t find storing everything on the server indefinitely to be of any use.

@andreicociuba
Copy link

I suppose this would be more traditionally known as a "retention time policy", and i think it should be per subscription, and if left blank and subscription has a "only download videos from last x days", it should maybe use the same time window.

having a global retention time policy should maybe be an option for admins, and it's pretty debatable how exactly it should work. i suspect that the correct answer is pretty much installation dependent, but that's just my 2 cents.

should it affect logged in users or not? tempted to say no...... but then if the purpose if it is to not overuse space on storage media then......

should it affect subscriptions that already have a retention policy? tempted to say no, but then you could set your per-subscription timeout to something virtually indistinguishable from infinity and circumvent it...... should it be that the shorter of the two is chosen? how is it indicated in the subscription? does it need a complicated or simple ui change?

should it affect only videos downloaded without a subscription?
should it affect playlists?

point being, i suggest a per-subscription retention policy might be the easiest of the two to implement, and bring more extra functionality than the various edge cases a global setting might bring. besides, i think it is a prerequisite for more global options, but i am deffinitely no expert.

@zpz5HAU-tgc3fgw2xwr
Copy link

Seeing as the last post here was from over a year ago, I'd like to comment and say this feature would still be much appreciated. I recently switched over to YTDL-Material from TubeSync due to some bugs that platform has, and this is one of the biggest features I've noticed is missing when comparing the two.

@Tzahi12345 Tzahi12345 added this to the v4.3.1 milestone Jul 3, 2022
@Tzahi12345
Copy link
Owner

I hear you. I'll line it up for v4.3.1, I'll probably make it a task that you can run periodically. It'll require adding options to tasks (in this case the amount of days), but it shouldn't be too difficult.

@alexdrl
Copy link

alexdrl commented Jan 11, 2023

hey @Tzahi12345 seen that you opened that PR lately with a lot of updates... apart from deleting old files, could we have some kind of option where we remove the files that are removed from the subscription list?

I don't want to use youtube-dl-material for archiving, want to use it mostly for downloading a local copy of some of my own watch later youtube list, so when done seeing the youtube videos I'd remove them from youtube and they will be removed from the local copy eventually

I;d be happy to give it a go developing that if needed once that big PR is in

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
is: enhancement New feature or extension of existing functionality
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants