I had to create a workaround in bash to detect files, currently being extracted:
Code: Select all
for f in $(find /downloads/RSScrawler/ -type f -name '*.m*');
do
# Check if the mkv/mp4/mp3 has been modified (extracted) in the last 60 seconds
if ! [ `stat --format=%Z $f` -le $(( `date +%s` - 60 )) ]; then
youngfile=true
echo "[$f wird gerade entpackt. Breche ab!]"
fi
done
IFS=$SAVEIFS
# if no young file was found, execute the main script
if [ "$youngfile" = false ] ; then
But sometimes filebot takes to long (because of the amount of files) to sort stuff. Meanwhile, downloading has continued and another file is being extracted. Filebot happily takes these files not fully extracted and sorts them away. This leaves behind broken files in my library, and I cannot wrap filebot in a better way to prevent this from happening.
Is there any way to stop AMC/filebot from moving files that are currently being modified (/increasing in size)?