Pokes Synology to index new media imported by Sonarr
This is a JS script that periodically checks for imported downloads in Sonarr. If it finds new media,
it will call synoindex
on that file.
-
Install NodeJs from the DiskStation package manager.
-
SSH into DiskStation and run
npm install forever -g
. This is required to run the script as a daemon. -
Copy
deploy/synopoke.js
to the DiskStation's/root/
directory -
Edit
deploy/S99synopoke.sh
and find the following line/root/synopoke.js host port apiKey restartAfter &
. Replace the parametershost port apiKey restartAfter
with the following:- host - IP address or host name of the Sonarr server
- port - port of the Sonarr server
- apiKey - your Sonarr API key
- restartAfter - how often you would want to check for new media in Sonarr (in milliseconds)
-
Copy
deploy/S99synopoke.sh
to the DiskStation's/usr/syno/etc/rc.d/
directory -
SSH into DiskStation and run
chmod 755 /usr/syno/etc/rc.d/S99synopoke.sh
, then/usr/syno/etc/rc.d/S99synopoke.sh start &
.
-
The first time synopoke is run, it will look for all media that was imported by Sonarr. This could take a while if the list is long. Succeeding runs will only look for the latest media.
-
If you updated DSM, you may need to do steps 3-5 again.
- Visual Studio 2013
- NodeJs Tools (http://nodejstools.codeplex.com/)