Post Reply 
 
Thread Rating:
  • 4 Vote(s) - 3.75 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Auto Rescan package for Synology users (formerly known as Auto Restart package)
29-12-2019, 18:55
Post: #183
RE: Auto Rescan package for Synology users (formerly known as Auto Restart package)
(28-12-2019 18:58)simoncn Wrote:  The 'about' command gives you this information. If the output from this command ends with 'starting', MinimServer is doing a rescan.

Thank you very much for the reply, this is perfect !

I am not even going to include the test of an already running scan, because although my music library has ~800 albums and 4403 files, both mp3 and flac, the scanning actually takes only a fraction of a second. Once again, congratulation, minimserver is a little jewel !

Below, my autoscan bash script if anybody else is interested. I tinkered it one evening before dinner, so dont expect anything fancy, but it works pretty well

Thank you and an happy new year !

C.

Code:
#!/bin/sh

ARMED=0;
while true ; do
  inotifywait -r -t 30 -e modify,create,delete,move ~/Music
  STATUS=$?
  [ $STATUS == 0 ] && ARMED=1;
  if [ $STATUS == 2 -a $ARMED == 1 ] ; then
    echo "minimserver rescan at: $(date)"
    ARMED=0;
    echo rescan | ~/MinimServer/minimserver/bin/mscript -a localhost
  fi
done
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: Auto Rescan package for Synology users (formerly known as Auto Restart package) - Cocoo - 29-12-2019 18:55

Forum Jump:


User(s) browsing this thread: 5 Guest(s)