Simple script to call Synology Photo's reindex API that can be scheduled to run periodically.
The CLI commands did not work for me, unfortunately.
git clone https://github.com/jmathai/synology-photos-reindexer.git
cd synology-photos-reindexer
python3 -m venv .env
source .env/bin/activate
pip3 install -r requirements.txt
export SYNO_USERNAME=<your synology username>
export SYNO_PASSWORD=<your synology password>
export SYNO_HOSTNAME=<your synology hostname or ip address>
You may see some errors about an InsecureRequestWarning
which can be ignored.
./main.py
Schedule this to run using Synology's Task scheduler which can be found in the Control Panel.
From the Task Scheduler click Create -> Scheduled Task -> User defined script.
On the Task Settings tab you'll use the following commands from above customized with your values.
export SYNO_USERNAME='<your synology username>'
export SYNO_PASSWORD='<your synology password>'
export SYNO_HOSTNAME='<your synology hostname or ip address>'
cd <path to git repo>
source .env/bin/activate
./main.py