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

Variable for "DELETE_AFTER" X hours #17

Closed
cameronetchart opened this issue May 27, 2021 · 1 comment
Closed

Variable for "DELETE_AFTER" X hours #17

cameronetchart opened this issue May 27, 2021 · 1 comment

Comments

@cameronetchart
Copy link

Is it possible to create an environmental variable called DELETE_AFTER or something similar that before or after a download/check automatically deletes all downloaded videos that have a date created/date modified older than X hours? This would make it easy to keep a chompy downloads folder clean without worrying about file size of videos, as an alternative to the MAX_SIZE variable. I'd like to keep videos around for 1 or 2 days, but no more, regardless of length/size.

Might have to automatically disable this if the PLAYLIST_SYNC variable is set.

@Hebo
Copy link
Owner

Hebo commented Jun 29, 2021

Seems related to my question in #16 (comment).

One possible option: You could set up a cron script to run find within the download folder for files older than your desired timeframe.

This could be built into Chompy with enough user interest, but one advantage of Chompy's simple, file-oriented design (no databases to muck with) is you can easily/safely do these deletions in a separate script.

@Hebo Hebo closed this as completed Feb 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants