I'm using Download Station of Synology combined to an RSS feed in order to automatically download some series (if you want to do that, it's there https://www.crisi.ch/automatically-down ... adstation/. What I wanted was to also download subtitles automatically.
Prerequisites
- You must have DSM 6.0 minimum on your Synology.
- You must have (and know how) to have access to your NAS via SSH.
First of all, we will need to install Java 8 on the NAS. If this is not done yet, you must open the package center, then find the package "Java8" and install it. If you had Java7 installed, you can remove it (at least it's what I did).
Once done, you can install FileBot

At that point, you should have FileBot correctly installed and running.
Configuration
Let's get into business. We first need to set up our OpenSubtitles account. The subtitles are going to be downloaded from the website http://www.opensubtitles.org/ so you need to create an account on it. Then you need to inform Filebot by following this procedure : viewtopic.php?f=3&t=228
Then you will need to set the Java path correctly.
But why? I've already installed Java 8 on the nas!
Because :
Got it? No? Allright, it's not a problem, neither did IRunning commands from the login shell is not the same as using Synology DSM Task Scheduler or cron because they'll not initialise with ~/.profile so PATH may be different.

The procedure is somehow explained here (https://www.youtube.com/watch?v=8N6hYNj ... tml5=False), but it's simple in our case so I've detailed it :
- Connect in SSH with the same user you will use for the task.
- Verify that Java is correctly installed by typing :
Code: Select all
java -version
- Then identify where it's installed by typing :
Code: Select all
echo ${JAVA_HOME}
You should have something similar to me. Now we just need to include Java for our user so that the Task can be ran! - You need to take the path you got from the previous command, remove jre at the end, and add bin/java, in my case it will be :
Code: Select all
sudo ln -s /var/packages/Java8/target/j2sdk-image/bin/java /usr/local/bin/java
- Enter your password and it's good.
- Verify it went well by typing :
and verify it points to the /usr/local/bin/java .
Code: Select all
which java
Adding the task
Before adding the Task, you need to identify where your movies and series are. In my case I have a folder named video which contains a folder named Series. In that folder, I have all my series. So for the Task, the path I will use will be /volume1/video/Series . That means that I want FileBot to download subtitles that are not present in any sub-folders of Series every time the task will be launched.
- Go to Synology Control Panel, and to Task Scheduler, then click on create -> Scheduled task -> User defined script.
- Give it a fancy name and select the same user you used in SSH.
- On the schedule tab, program it daily for example.
- On Task settings, write a command (examples are here : http://www.filebot.net/cli.html ), in order to download the missing subtitles for your series :
Do not forget to use maxAgeDays as specified here : viewtopic.php?f=4&t=5#p8871
Code: Select all
cd /var/services/homes/master filebot -script fn:suball /volume1/video/Series/ --def maxAgeDays=7
I put a cd command just before calling FileBot because my user is different from admin and somehow, the taskManager is not at the right place when starting. If your user is admin, you should not need that command. - Click OK
You can redirect the output log as specified here : http://www.filebot.net/forums/viewtopic ... 802#p12015
But since you are noob like me

- In the Control Panel, select the task you just created, then hit the Settings button.
- You can now enable the output and select a folder where the results of the Task will be printed.
In my case I put it in video folder which is rather dumb but I like to spice things a little
FAQ
But the task will be executed each day, I want it to be executed when my downloads are finished!
First of all, settle down cowboy. You are lucky someone like rednoah developed a tool allowing you to automatically do things. Then, the download station of Synology doesn't allow (yet) to run scripts when a download is done. So the solution right now is to run periodically a Task that will download missing subtitles.
This is very cool for the future as everything will be automatically done but I have downloaded a Serie a long time ago, and I want to download the subtitles!
You are totally right. The script is working for future downloads as we indicated maxAgeDays to 7 and we do not download subtitles for files that are older that 7 days. In your case, you should connect in SSH, go to the folder where all your episodes are, and run the command manually :
Code: Select all
filebot -script fn:suball /path/to/media
Allright this is cool but I'm french, and as you know, french do not speak very good english
Hello there french fellow. I understand your pain since I'm also French. What you need is to add a little option that you can find here (http://www.filebot.net/cli.html) in order to specify that you want French subtitles!
Code: Select all
filebot -script fn:suball /volume1/video/Séries/ --lang fr --def maxAgeDays=7