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)
28-12-2019, 14:21
Post: #181
RE: Auto Rescan package for Synology users (formerly known as Auto Restart package)
Hello,

I have been using minimserver for a few months, I quickly adopted it as my favorite upnp server, I love it, congratulation for this wonderfull project !

I use inotifywait under Linux with a couple of lines of bash to trigger the rescan of my library when I add new files. It is not ideal because I did not find the way to know whether minimserver is already in the process of rescanning or not. So it may trigger a rescan whereas it is already in the process of rescanning. It would greatly help to have an easy way to get the status of the current rescan (for example in the output of the "about" command). It would prevent from triggering a rescan if one is already running and makes it possible to implement a very simple autorescan in a couple of lines of bach script. Is it difficult to get this information ? Is it possible to implement it ?

Of course, the perfection would be to integrate the autoscanning within minimserver itself, with partial rescan of only the modified information, etc... But this requires a major rework of the source, whereas it might be much easier to output the rescan activity in the about output.

Thank you,

C.
Find all posts by this user
Quote this message in a reply
28-12-2019, 18:58
Post: #182
RE: Auto Rescan package for Synology users (formerly known as Auto Restart package)
The 'about' command gives you this information. If the output from this command ends with 'starting', MinimServer is doing a rescan.
Find all posts by this user
Quote this message in a reply
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
05-01-2020, 08:06
Post: #184
RE: Auto Rescan package for Synology users (formerly known as Auto Restart package)
Trying to add ''http://synology.francis-besset.com/'' to package sources, but get an invalid location error. Any other sources, please?
Find all posts by this user
Quote this message in a reply
08-01-2020, 13:22
Post: #185
RE: Auto Rescan package for Synology users (formerly known as Auto Restart package)
(05-01-2020 08:06)alexj700 Wrote:  Trying to add ''http://synology.francis-besset.com/'' to package sources, but get an invalid location error. Any other sources, please?
Hello I have the exact same problem, any solution?
Find all posts by this user
Quote this message in a reply
Post Reply 


Forum Jump:


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