- Ubuntu 18.04.3 headless.
- This box is a local seedbox and media server.
- Files are hardlinked.
- excludes has been in use for several years.
Code: Select all
#!/bin/bash
NOW=$(date +"%c")
LOGDIR="/home/gallo/.log/filebot"
LOGFILE="filebot_$NOW.log"
DST="/zpool/view"
SRC="/zpool/done/ser"
TV_FORMAT="{plex}"
if find $SRC -type f -mtime -1 | read
then echo "Running Filebot in $SRC"
filebot -script fn:amc --output $DST \
--log-file $LOGDIR/filebot-amc.log \
--action hardlink -non-strict \
--db TheTVDB "$SRC" --def \
excludeList=$LOGDIR/filebot-history.log \
minFileSize=1 subtitles=en,es artwork=y \
extras=y seriesFormat=$TV_FORMAT \
fi
done
echo "Finished processing for files at $NOW." | tee -a $LOGDIR/$LOGFILE
exit
Purpose
To catch files that deluge-postprocess.sh missed
Problem
The current iteration of the script reads all the files then reads excludes, then processes files. Something broke, in that script either failed to "FIND" <24hr old files. or FIND works, and filebot scans all files anway.
Consequences A. takes 5-8 mins before script BEGINS to process skipped files.
B. The script is locked and cannot process any other files that are finished downloading, causing some files to be missed/skipped inavertdently.
------
Idea 1
Download to new/different folder
Consequences
A. excludes list incrementally grows and restarts the original issue.
Idea 2
cleanup/remove excludes
Consequences
A. list rebuilds fast due to permaseeding all previous downloads.
B. still does not force filebot to only process new files.
Idea 3
alias/abbr to call filebot with flags
Consequences
A. still have to type/tab out file pathname
B. excludes will still be read THEN skipped, THEN files are processed
Suggestions
requesting help to make filebot only process files in the last X (in this case 24 hours)
Feature Request to add
Code: Select all
maxFileAge=
Code: Select all
--def