pinchflat
pinchflat copied to clipboard
[Bug] Orphaned files on 'Delete Source + Files'
Expected behaviour: When choosing Delete Source + Files from source info page, all files are deleted and download queue is cancelled.
Current behaviour: Choosing Delete Source + Files while a playlist is being downloaded results in orphaned files in the target path that were in the queue(s).
Thanks for the report! I'll look into this over the weekend
This is turning out to be more complicated than I expected to get it to work reliably. There's a yt-dlp bug described in #139 that would allow storing temporary files in the tmp directory which would make this really easy. I'm going to put this on hold until that bug is fixed or I think of another approach
(note to self) this is improved with #182 but still doesn't delete all files if the job is terminated before the final video pieces are assembled
I think I might have just ran into this. I accidentally added an enormous YT channel without a limit. I updated it, but Pinchflat didn't update the pending queue so I tried deleting it. When I went to re-add it I get this cryptic error:
By deleting the lingering directory I was able to re-add the source. Ideally, one of two things would happen in my case:
- Deleting/re-adding ignores the existing directory if it exists (or maybe warns w/ confirm).
- Re-evaluating retention period during the syncing process and/or when a forced re-index happened (I tried this and it had no effect).
@joestump this error is unrelated - that's what happens when you try to re-add a source while it's in the process of being deleted. Deletion happens behind-the-scenes and can take several minutes for a sufficiently large source.
This can probably be improved, but it's lower on my priority list. One day!