@henryjfry wrote:
Hello
I have got flexget setup to sort tv episodes into my main download folder with the move plugin and have the clean source function enabled to remove anything left over, which kindof works.
However there are some directories that will give the error:
[Errno 39] Directory not empty:I can use exec functions to deal with this:
for_accepted: - rm -r /mnt/Torrent/{{title}} on_exit: phase: - find /mnt/Torrent/* -type d -empty -exec rmdir {} \;
Id be happy enough if I could just use "rm -r /mnt/Torrent/{{title}}" however as "Title" when it comes to the sort operation actually means "Original Filename" and there is no tag for folder, I will need to adjust "title" to equal folder to ensure the correct folders actually get removed.
Or I could clear all empty directories on exit with:
- find /mnt/Torrent/* -type d -empty -exec rmdir {} \;But neither are exactly elegant.
I have clean transmission setup to clean torrents before they are moved (as I suspect the timing of these events is involved in why some folders remain after clean source) can anyone explain why flexget periodically thinks these directories are not empty?
I thought it might have to do with permissions on the NAS share where the files are going but after setting up the NFS shares on the NAS I dont think this is the problem (I can actually delete folders from linux now without leaving behind undeletable remnants which can only be removed by root on the NAS)
Does anyone know how to make the clean transmission step occur before the move step? Without having to schedule it to specifically occur before it?
If so in the scheduler would that be like clean, sort. ie clean runs first?
Is there some permissions issue with flexget? I recently appeared to have trouble with the transmission-daemon user and had to change it to my main user to suit the NFS.I have a script which could be used to remove the torrents separately, assuming Title (which is now the torrent folder name) matched the grep for transmission listing which I haven't really tested too much.
sh /home/pi/scripts/removetorrent.sh {{title}}
and the script:
text="$(transmission-remote --auth user:pw -l | grep -F -i $1 | cut --only-delimited --delimiter=' ' --fields=4)"
transmission-remote --auth user:pw -t $text -rAny guidance on the clean_source function would be great.
Posts: 3
Participants: 1