An automatic multilingual subtitle downloader using a custom script to run Filebot Subtitle Downloader
Description
Custom script for Sonarr for automated multilingual subtitle downloading.
This script uses Filebot to search for missing subtitles by hash in the given language(s) and
saves the file with ISO 639-2/B language code(s).
This handy for Plex users for instance, since Plex doesn’t support ISO 639-3 codes.
If multiple languages are required add them as a comma-separated list (without spaces!) eg. nl,en,fr,de
Prerequisites
Filebot
Filebot added to your system’s PATH (Environment Variable) setting
If you run Sonarr as a Windows service, DO NOT run it under the Local System account. Sonarr as a Windows service under the Local System Account doesn’t execute custom scripts. Run it as a user. Or you can run Sonarr as an application!
Copy sonarr-subber.groovy to your preferred location on your harddrive
In Sonarr navigate to Sonarr -> Settings -> Connect -> [+] -> Custom Script
In the Pop-up enter the following:
Name: Enter a descriptive name to your liking eg. Sonarr Subtitle Downloader
On Grab: No
On Download: Yes
On Upgrade: Yes
On Rename: No
Filter Series Tags: Use at your own discretion
Path: Full path to Filebot. (On Windows systems: C:\Program Files\FileBot\filebot.exe)
Arguments: -script “FULL-PATH-TO\sonarr-subber.groovy” --lang [2-letter ISO 639-1 language code(s)]
Click on the Test button.
If the test succeeded click on the Save button.
Arguments examples
In these examples it’s assumed you copied sonarr-subber.groovy to C:\MyScripts\ on a Windows system.
Search for Dutch subtitles:
-script “C:\MyScripts\sonarr-subber.groovy” --lang nl
Search for Dutch, English and French subtitles:
-script “C:\MyScripts\sonarr-subber.groovy” --lang nl,en,fr
*EDIT
It works, probably the first couple things i downloaded had no dutch subs.
My bad
Hiii!
it wont work at my pc, i think i have the right settings…
Installed Filebot -> with login to open subtitles
its in my env variable
Sonarr is running as a service, not local system account. my own user account
In sonarr custom script
on grab no
on download yes
on upgrade yes
on rename no
filter serie tags: i left it empty??
Path: C:\Program Files\FileBot\filebot.exe
Arg: -script “D:\Scripts\sonarr-subber.groovy” --lang nl there is the script…
Nice. I was looking for a way to do this using my own subtitle downloader (SolEol), for which I made a CLI version some time ago, and this script is a fantastic starting point.
It wouldn’t be a bad thing if something could be set to review missing subs after a while. Sonarr searches too early (for non-native languages subs usually take half a day or so to appear).
I’d rather not set a separate cronjob for this, but I’m not sure if there’s a way to use Sonarr to periodically (twice a day) search for missing subs.
Go to: Settings -> Indexers -> Options -> Minimum Age.
Enter the number of minutes you want Sonarr to wait before downloading episodes.
One day has 1440 minutes, so do the math
I have Sonarr to wait for a week, because Dutch subs usually take one to two weeks before surfacing.
After that a cronjob or scheduled job will still be necessary
Glad you like it. Shouldn’t be to hard to port it to SolEol
I think I did get it to work with sonar on my synology device. But the problem is i see this error on the logs.
OpenSubtitles: Please enter your login details by calling filebot -script fn:configure
any help?
Did you try running the command? You need to make a free account at OpenSubtitles. Then you need to tell Filebot the login credentials to enable it to find subtitles.
@Zignature Script works great! Do you know if there is any way to run it on already downloaded (existing) series? Thanks!
You need to change a couple of things to suit your setup:
change the path to the folder where you keep your files
change the language code if necessary
if you want an “exact” search delete the “-non-strict” part
I have saved this line of script in a cmd file e.g. getSubs.cmd on a Windows system.
The script will traverse the folder and will download any missing subtitle files if it can find any.
Make sure Filebot is added to your system’s PATH environment variable.
Didn’t work
I got (No matching subtitles found: )
And i did search for the subtitle in opensubtitle and i find it there
I think its search for the subtitle in tv show !
I just notice the same problem with sonarr !!
(No matching subtitles found: E:\TV Shows\The Middle\Season 4\The.Middle.S04E11.Life.Skills.DVD.mkv )
I am seraching for arabic subtitle
It was working then i just check some series and found no subtitle !!
But when i checked opensubtitles.com i did found the subtitles !