-
-
Notifications
You must be signed in to change notification settings - Fork 132
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
Not deleting media older than "days to keep" #206
Comments
Thanks for the comments! That could well be a bug. I'll leave this open and investigate. I'm assuming you're on normal-ish Linux and not running it with weird WSL paths on Windows or anything? |
Open SuSE Leap 15.3, so... weird enough, but normal-ish :) I'm running a home assistant and a nextcloud docker image in the same machine and they have been fine for a few months. It's a VM on a Dell R710, running ESXi, and the VM has 8 GB RAM, 120 GB disk. |
Thanks for the details. If you can easily search the container logs are there any errors? If for some reason it's attempting to clear up files that don't exist due to an invalid path or similar issue there should be a log of it. |
I did
39 sounds like the number of videos that should be getting deleted, might be a coincidental number, though. Here's more context:
|
That's a "normal" error, that video ( https://www.youtube.com/watch?v=7wLxM7oNN1s ) does seem to be actually unavailable so TubeSync is correct there. Thanks, I'll check the old media cleanup code. |
I could share my screen via something like Discord or Jitsi if that helps, type whatever so you can see output. That's the only ERROR line type. The log file abc is 24,700 lines long just for the last day, lol. |
Thanks for the offer, but it's probably not too useful right now. If there was an attempt to delete the wrong path in a cleanup it would have left a note in the error log. It should be relatively easy to trace why the clean-up isn't firing. |
|
I don't know if this helps, but if I hit skipped media, it shows 55 pages of 144 videos each, so that's almost 8000 videos for it to index. Maybe it's too many for it to handle? One channel by itself is somewhere around 5000 videos. |
That amount of media should be fine, it's likely an issue detecting if the file exists or some other sort of path issue. If the the media has been downloaded already and exists on your local disk it must have been indexed properly already, so the max-age deletion should pick it up. |
I decided to remove some of the downloads manually to recover disk space yesterday around 10:30 AM server time. I did a docker exec into the container and then rm 2021*, rm 2022-01-0* and rm 2022-01-1* in each directory inside /downloads (removing anything older than 11 days, all the sources are configured in tubesync to remove items older than 10 days). Here's the log file for the last two days: https://docs.rediske.org/2022-02-01.txt |
@rrediske, in the UI on the media tab, do your episodes that you expect to be deleted show a "downloading" text? |
I just discovered, that my TubeSync also fails to delete older content. I had it set for 10 days, but I still have all the content from the last half year. |
I'm not aware of this not functioning in the current release, however the logic might not be entirely clear. As per: https://github.com/meeb/tubesync/blob/main/tubesync/sync/tasks.py#L134 The log.info(f'Deleting expired media: {media.source} / {media} '
f'(now older than {media.source.days_to_keep} days / '
f'download_date before {delta})') The media deletion should be triggered if the following conditions are met:
The clean-up code is relatively simple and I can't obviously see any issues with it. If you can confirm the above 5 prerequisites are met and your media still isn't being deleted let me know and I'll pop a bunch of debug logging into the tasks to work out what isn't firing on your installation. |
I checked the log again for "Deleting expired" and found the following entry (among others):
Now while it seems that TubeSync is deleting the files, they still exist on the disk. When I "View media linked to this source" however, I can only see three episodes, while all previous ones appear now as "Skipped". |
I'm seeing this as well on 0.12.0. Running in Docker and using a host-mounted NFS share for /downloads.
|
I am facing the same issue in TubeSync version 0.12.1 running in a Docker container with media files located on the host system. @meeb, you explained
With commit 410906ad8eeec03c34723cda18eba21f8c742cab the media file deletion was removed from the Presumably, the file deletion should now also be done explicitly triggered by |
Yeah file deletion can probably be put back into signals now. If I recall some logic was moved because some users reported it was erroneously deleting media and causing issues and there are issues with the tasks firing reliably (which is a much larger ongoing issue with attempting to replace the entire tasks system). |
This should have been resolved for quite some time. I'll close this for now. Please create a new issue if you still experience this. |
First, thank you for this wonderful way to download videos automatically!
The problem I am having is that tubesync isn't removing videos from any of the four channels I have it watching, so I will eventually run out of disk space if I can't find a way to delete old videos. I used your basic 13 line docker-compose.yml, so I have nothing special for configuration. When adding each channel, I set the "download cap" to 1 week and the "days to keep" to 10 days, but tubesync still has every video it's ever downloaded going back to December 13th of last year (I'm now at 63 videos).
In a previous install on another machine, I tried deleting videos manually from the mounted volume "tubesync-downloads", but that seemed to cause tubesync to stop downloading anything else, so I wound up moving to a new machine to start over. It takes almost 2 full days for tubesync to index all the videos of the 4 channels I watch, so I really want to avoid having to do that.
Any ideas? Am I doing something wrong?
The text was updated successfully, but these errors were encountered: