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
12-03-2020, 20:16
Post: #186
RE: Auto Rescan package for Synology users (formerly known as Auto Restart package)
The inotify-tools are available via the SynoCommunity provided packages as of today.
My pull request was finally merged yesterday and published today:
https://synocommunity.com/package/inotify-tools

Would be cool if someone could update @winxi's installation instructions within the first post.
General install instructions for SynoCommunity packages are provided on their main page: https://synocommunity.com/
Find all posts by this user
Quote this message in a reply
29-05-2021, 10:54
Post: #187
RE: Auto Rescan package for Synology users (formerly known as Auto Restart package)
(12-03-2020 20:16)DLNABubble Wrote:  The inotify-tools are available via the SynoCommunity provided packages as of today.

I have managed to install the inotify-tools on my DS1815+. Is there anything else I need to do to make auto-rescan work?
Thanks
Rudi
Find all posts by this user
Quote this message in a reply
31-05-2021, 07:15
Post: #188
RE: Auto Rescan package for Synology users (formerly known as Auto Restart package)
(29-05-2021 10:54)jacobacci Wrote:  Is there anything else I need to do to make auto-rescan work?
Oh, I'm happy someone is using it :-)

You do need to install winxi's AutoRescan-1.1.spk right from the first post of this thread using "Manual Install" from inside the "Package Center".
[Image: AutoRescan.png]
Find all posts by this user
Quote this message in a reply
01-06-2021, 14:38 (This post was last modified: 01-06-2021 14:45 by jacobacci.)
Post: #189
RE: Auto Rescan package for Synology users (formerly known as Auto Restart package)
(31-05-2021 07:15)DLNABubble Wrote:  You do need to install winxi's AutoRescan-1.1.spk right from the first post of this thread using "Manual Install" from inside the "Package Center".

Did that without any problems. However minimserver does not seem to autoupdate. I put three new albums on the NAS yesterday and minim is not showing them today.
Do I need to configure anything?

I have just done a manual rescan of minimserver and it found the new albums without issues.
Find all posts by this user
Quote this message in a reply
01-06-2021, 20:38
Post: #190
RE: Auto Rescan package for Synology users (formerly known as Auto Restart package)
No, you don't need to configure anything.

The elaborate answer:
To quote from winxi's post
"When starting the package, it extracts the name(s) of the MinimServer content directory(ies) from the MinimServer config file and establishes watches for this(ese) directory(ies)."
I just tested it again and could clearly see the notice
"Media server status for MinimServer[synobox]: Restarting" on the MinimServer's status page on the Synology box.

After that, it takes quite a while before I can see the new content within the "MediaPlayer" I tested it on (BubbleUPnP on Android, and some UPnP aware radios). I even had the impression, that I had to choose a different media server and return to the original one before the new content was being picked up.
I had hoped for so long, MinimServer would be enbabled to to trigger a rescan on a subfolder via some API. ....

Since winxi's package does parse the MinimServer's config file, the version of the MinimSever installed might be important. Maybe, it's format might have changed in more recent versions.
(The AutoRescan spk [Synology Package] is nothing else than a normal tar which can be looked into and within the script folder you'll find the start-stop-status script containing something like `CONTENT_DIRS=$(cat $MINIM_CONFIG | grep contentDir` ...)
That means, the AutoRescan package should pick up the up the folder(s) it should install inotify watches on.
I for myself will stick to version 0.8.x (which I had donated for in the past) on which this all works on, even though not as smooth as I would like too.
Find all posts by this user
Quote this message in a reply
Post Reply 


Forum Jump:


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