synoindex-server is a web service wrapper for Synology NAS native 'synoindex'.
Since Synology DSM 6.0 comes Docker support. Users run many media services in the docker. But we can't notify Synology NAS to reindexing new files in the docker's container. We can run synoindex inside the docker's container and request simple-synoindex-server to calling native synoindex to reindexing your new files. This is a python implementation with a bit more control over http-server that runs in the background.
based on:
- 'simple-synoindex-server' (https://github.com/racklin/simple-synoindex-server) for x86 or x64 cpu
- Python port (https://github.com/jhyun15/synoindex-server).
Required python (>=3.0) Tested on Synology DS218+.
- Download python file to any directory.
(ex. /volume1/homes/admin)
- Run 'synoindex_server_native.py' by task scheduler when boot-up with ipaddress and port command line argument
python3 /volume1/homes/admin/synoindex_server_native.py ipadress port
Example: force indexer to reindex the folder /volume1/download
http://192.168.0.1:9998/synoindex/?args=-R&args=/volume1/download
Example: force indexer to reindex the folder /volume1/download
#!/bin/bash
http://192.168.0.1:9998/shutdown
When running Transmission in a docker environment. A new script can be written that initiates the indexer using e.g curl
#!/bin/bash
curl -G -d "args=-R" -d "args=/volume1/download" http://192.168.0.1:9998/synoindex
Next Transmission should be instructed to run that script upon completion. This can be done in the settings.json
of transmission.
"script-torrent-done-enabled": true,
"script-torrent-done-filename": "/config/my_custom_script",