tvstreamrecord icon indicating copy to clipboard operation
tvstreamrecord copied to clipboard

Synology: using synoindex with Docker

Open Pavion opened this issue 4 years ago • 0 comments

Issue: Using a Docker installation it's not possible to access synoindex.

Some workarounds with Synology Task Scheduler can be tried instead. You will found the Task Scheduler in the Control Panel of your DiskStation Manager.

1. Reindex whole folder

Schedule this command with the Task Scheduler:

synoindex -A /myExternalVideoPath

No post-processing command is necessary.

2. Index only new files (advanced solution)

  • collect new file names using post-processing option of tvstreamrecord (here the internal Docker path must be used):
sed -i "$ a\%file%" /volume1/common/list.txt

Note: sed have to be used, normal output redirection >> will not work.

  • schedule a new script (here the external DS path must be used):

This script will check whether the output file exists. In this case, synoindex will be called for each line of this file and the file will be removed afterwards. This solution should have a smaller impact and could thus be run more often.

#bin/sh
file="/myExternalVideoPath/list.txt"
if test -f $file; then
    while read p; do
        synoindex -a "$p"
    done < $file
    rm $file    
fi

Feedback / confirmation are welcome.

Pavion avatar Apr 03 '21 08:04 Pavion