filebot-watcher cleanup not working

Any questions? Need some help?
Post Reply
Thyronic
Posts: 4
Joined: 19 Mar 2023, 18:33

filebot-watcher cleanup not working

Post by Thyronic »

Hello,

I'm using filebot-watcher and it fails to clean up .NFO and Trailers in certain cases.
Image

Based on my analysis I think the following happens:
  • JDownloader Evenscripter moves extracted files and folders instantly to "/volume1/Downloads/FILEBOT", as soon as they are completly extracted
  • filebot-watcher then starts to process the new files after 10 seconds and tries to clean up afterwards
  • In the meantime, JDownloader Evenscripter moves even more extracted files and folders to "/volume1/Downloads/FILEBOT"
  • filebot-watcher refuses to clean up trailers and .NFO files because in the meantime new files appeared (I don't understand why he refuses to clean up trailers and NFOs)

Code: Select all

Keep /volume1/Downloads/FILEBOT/xyz.s01e01.german.dl.1080p.bluray.x264-excited.nfo (parent folder contains media files) 
  • filebot-watcher never cleans up the files, even when no "real" media files are present anymore except trailers and NFO files

Log output:
filebot-watcher is running with the following parameters:

Code: Select all

docker run -it \
    --restart always \
    --name=filebot-watcher \
    -v /share/CACHEDEV1_DATA/Plex:/volume1 \
    -v /share/CACHEDEV2_DATA/Container/filebot-watcher:/data \
    --env SETTLE_DOWN_TIME=10 \
    rednoah/filebot:watcher /volume1/Downloads/FILEBOT \
    --output /volume1/Mediathek \
    --action move \
    -non-strict \
    --order Airdate \
    --def clean=y \
    --conflict auto \
    --lang German \
    --log all \
    --log-file amc.log \
    --def skipExtract=n \
    --def deleteAfterExtract=y \
    --def music=n \
    --def seriesFormat={plex} \
    --def animeFormat={plex} \
    --def movieFormat={plex} \
    --def movieDB=TheMovieDB \
    --def animeDB=TheMovieDB::TV \
    --def seriesDB=TheMovieDB::TV \
    --def artwork=y \
    --def plex=192.168.178.101:***** \
    --def excludeList=exclude.txt \
    
Please advise what's the best procedure to clean up this kind of files automatically or if I'm misunderstanding anything. Also tried to define --def minsize=bytes etc.
User avatar
rednoah
The Source
Posts: 22898
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: filebot-watcher cleanup not working

Post by rednoah »

Here's how the cleaner script works:
https://github.com/filebot/scripts/blob ... ner.groovy

:idea: It's all about either deleting a given folder structure entirely, or not touch that folder structure at all, very conservatively, to ensure that we're not accidentally mass-deleting cherry-picked files, such as "Trailer Park Boys" and unexpected corner cases like that, or important system files when accidentally called with / as input argument, etc.


:?: Do you perhaps have a *.mkv file larger than 100 MB in that folder?
:idea: Please read the FAQ and How to Request Help.
Thyronic
Posts: 4
Joined: 19 Mar 2023, 18:33

Re: filebot-watcher cleanup not working

Post by Thyronic »

Thanks for your quick, detailed and helpful feedback, which helped me understand it a lot better!. It Does Make sense that the script only wants to delete the whole folder structure and doesn't want to cherry-pick, it would be a shame to delete a Trailer Park Boys album. ;-)

There was indeed a trailer in the folder with 102 MB, I added the following line and resolved the issue for me with it.:

Code: Select all

--def maxsize=150000000
Post Reply