I had some problems with my Synology diskstation. When I downloaded new files I had to do a manual re-index and that costed me over an hour everytime because of the amount of mediafiles that had to reindex.
I created a post process script for SABNZBD that scans for the files that are created 7 days ago and add's only those files to the index.
To use -ctime you have to instal findutils on your diskstation. -mtime is already there, but -mtime is not handy when downloading older mediafiles.
start.sh
#!/bin/sh
/volume1/SABNZBD/SABnzbd/scripts/index.sh 2>&1 | tee /volume1/SABNZBD/SABnzbd/scripts/logs/logje
index.sh
#!/bin/sh
set -x on
date
#SCAN DIRS
/opt/bin/find /volume1/video/Series -type d -print >> /volume1/SABNZBD/SABnzbd/scripts/logs/newdirs
/opt/bin/find /volumeUSB2/usbshare/Series -type d -print >> /volume1/SABNZBD/SABnzbd/scripts/logs/newdirs
#CREATE SCRIPTS FOR ADDING FOLDERS
while read line; do echo -e synoindex -A "'$line'"; done < /volume1/SABNZBD/SABnzbd/scripts/logs/newdirs >> /volume1/SABNZBD/SABnzbd/scripts/seriesdirprocess.sh
#SCAN NEW FILES
/opt/bin/find /volume1/video/Series -ctime -1 -iname "*.mpg" >> /volume1/SABNZBD/SABnzbd/scripts/logs/new
/opt/bin/find /volume1/video/Series -ctime -1 -iname "*.mp4" >> /volume1/SABNZBD/SABnzbd/scripts/logs/new
/opt/bin/find /volume1/video/Series -ctime -1 -iname "*.mkv" >> /volume1/SABNZBD/SABnzbd/scripts/logs/new
/opt/bin/find /volume1/video/Series -ctime -1 -iname "*.avi" >> /volume1/SABNZBD/SABnzbd/scripts/logs/new
/opt/bin/find /volume1/video/Series -ctime -1 -iname "*.mov" >> /volume1/SABNZBD/SABnzbd/scripts/logs/new
/opt/bin/find /volumeUSB2/usbshare/Series -ctime -1 -iname "*.mpg" >> /volume1/SABNZBD/SABnzbd/scripts/logs/new
/opt/bin/find /volumeUSB2/usbshare/Series -ctime -1 -iname "*.mp4" >> /volume1/SABNZBD/SABnzbd/scripts/logs/new
/opt/bin/find /volumeUSB2/usbshare/Series -ctime -1 -iname "*.mkv" >> /volume1/SABNZBD/SABnzbd/scripts/logs/new
/opt/bin/find /volumeUSB2/usbshare/Series -ctime -1 -iname "*.avi" >> /volume1/SABNZBD/SABnzbd/scripts/logs/new
/opt/bin/find /volumeUSB2/usbshare/Series -ctime -1 -iname "*.mov" >> /volume1/SABNZBD/SABnzbd/scripts/logs/new
#CREATE SCRIPT FOR ADDING NEW FILES
while read line; do echo -e synoindex -a "'$line'"; done < /volume1/SABNZBD/SABnzbd/scripts/logs/new >> /volume1/SABNZBD/SABnzbd/scripts/seriesprocess.sh
#SET PERMISSIONS
/opt/bin/chmod 777 /volume1/SABNZBD/SABnzbd/scripts/seriesprocess.sh
/opt/bin/chown sabnzbd:users /volume1/SABNZBD/SABnzbd/scripts/seriesprocess.sh
/opt/bin/chmod 777 /volume1/SABNZBD/SABnzbd/scripts/seriesdirprocess.sh
/opt/bin/chown sabnzbd:users /volume1/SABNZBD/SABnzbd/scripts/seriesdirprocess.sh
#EXECUTE SCRIPT FOR ADDING NEW FOLDERS
sh -x /volume1/SABNZBD/SABnzbd/scripts/seriesdirprocess.sh
sleep 5
#EXECUTE SCRIPT FOR ADDING NEW FILES
sh -x /volume1/SABNZBD/SABnzbd/scripts/seriesprocess.sh
sleep 5
#CLEAN UP
mv /volume1/SABNZBD/SABnzbd/scripts/logs/logje /volume1/SABNZBD/SABnzbd/scripts/logs/backup/logje_`date +"%Y-%m-%d--%H%M%S"`
mv /volume1/SABNZBD/SABnzbd/scripts/logs/new /volume1/SABNZBD/SABnzbd/scripts/logs/backup/new_`date +"%Y-%m-%d--%H%M%S"`
mv /volume1/SABNZBD/SABnzbd/scripts/seriesprocess.sh /volume1/SABNZBD/SABnzbd/scripts/logs/backup/process_`date +"%Y-%m-%d--%H%M%S"`
mv /volume1/SABNZBD/SABnzbd/scripts/seriesdirprocess.sh /volume1/SABNZBD/SABnzbd/scripts/logs/backup/seriesdirprocess_`date +"%Y-%m-%d--%H%M%S"`
mv /volume1/SABNZBD/SABnzbd/scripts/logs/newdirs /volume1/SABNZBD/SABnzbd/scripts/logs/backup/newdirs_`date +"%Y-%m-%d--%H%M%S"`
set -x off
You have to create the follow folders on your diskstation:
/volume1/SABNZBD/SABnzbd/scripts/
/volume1/SABNZBD/SABnzbd/scripts/logs/
/volume1/SABNZBD/SABnzbd/scripts/logs/backup/
If anyone have some corrections or add-ons don't hesitate!