[Sonarr AutoSubber v2] - PPS for multilingual automated subtitle downloading


#1

A newer cross-platform version can be found here:

An automatic multilingual subtitle downloader using a custom script (Windows batch file) invoking Filebot Subtitle Downloader


Prerequisites:

  • An Opensubtitles.org account
  • Filebot
  • Filebot in your system’s PATH (Environment Variable) setting
  • Windows OS (it’s probably pretty easy to port to Mac or Linux)
  • Run Sonarr as an application! NOT as a Windows Service! Sonarr as a service doesn’t seem to fire custom scripts.

What Does It Do?

After importing a downloaded episode the script invokes Filebot to search and download the correct subtitle file in SRT format. Your preferred language is added as an argument in Sonarr, using 2-letter ISO 639-1 language code eg. nl. For multiple languages add them as a comma-separated list (without spaces!) eg. nl,en,fr
Filebot searches by hash to ensure the correct subtitle is indeed downloaded. If it doesn’t find a subtitle, Filebot simply ends. The script also works with manual imports (Sonarr -> Wanted -> Manual Import).

Since Plex doesn’t support ISO 639-3 language codes, the script converts the ISO 639-3 codes to ISO 639-2/B codes.


The Batch File:

@ECHO OFF
@setlocal EnableDelayedExpansion

:: [Sonarr AutoSubber v2] by Zignature & rednoah

:: NOTES:
:: Filebot.exe needs to be in your system’s PATH (Environment Variable) setting!!!
:: Sonarr needs to run as an application. NOT as a Windows service!

:: Invoke Filebot to search for subtitle(s) by hash (strict mode).
START “Searching subtitle(s)…” /WAIT filebot -script “E:\Scripts\ISO639-2B-subber.groovy” “%sonarr_episodefile_path%” --lang %1


The Groovy Script

The engine of it all :slight_smile:
http://pastebin.com/CYcUrBEK

How To Setup?

  1. Register an account at http://www.opensubtitles.org/
  2. Download (http://www.filebot.net/) and install Filebot (it’s a Java application, so it’s cross-platform!)
  3. Add filebot to your system’s PATH (Environment Variable) setting
  4. Copy the code for the batch file and save as sonarr-autosubber.bat
  5. Setup the custom script in Sonarr (Sonarr -> Settings -> Connect -> + -> Custom Script)
    Single language:

    Multiple languages:

    5a. Name: Sonarr AutoSubber (or whatever you fancy)
    5b. On Grab: No, On Download: Yes, On Upgrade: Yes, On Rename: No
    5c. Path: C:\Windows\System32\cmd.exe
    5d. Arguments: /C “C:\FULL-PATH-TO\autosubber.bat [2-letter ISO 639-1 language code(s)]” (In my case: /C “E:\Scripts\autosubber.bat nl”)
  6. Save the custom script

A million thanks and kudos go out to rednoah for putting my concept to script!

Happy dowloading! :sunglasses:


Add a list in sonarr for new tv show and for best rating tv show
Release Groups shown in Activity History
#2

Hi @Zignature is working but… I have my sonarr configured to move episodes after download it and your script downloads the subtitle on the download folder and is never moved to the series folder :frowning: any idea?


#3

You need to adapt the script that moves your episodes to include the subtitle(s).

Can you share the script that moves the episodes?


#4

If you use the latest version of the AutoSubber it would probably be possible to add the moving part to it since Filebot is able to move files as well.


#5

I use the option that you have with sonarr


#6

If you let Sonarr move your episodes, it sounds to me you’re getting the subtitles “On Grab”.
You need to get the subtitles “On Download” and “On Upgrade”. Check out the screenshots for the correct settings.


#7

This was my config:


And now:

is it correct?


#8

Should work now :slight_smile:


#9

nothing changed :frowning:

1.- The video is downloaded on C:/Downloads/Serie123 via utorrent
2.- The subtitle is downloaded on the same folder
3.- Sonarr move the video to D:/Series/Serie123
4.- Sonarr remove other files of c:/Downloads/Serie123

:S


#10

I’m gonna have to try to reproduce your error.
I never work with torrents, only with NZBs (Usenet). So I’ll have to setup Sonarr for Torrents first.

I’ll get back to you when I find a solution.


#11

I’ve setup Deluge for torrent downloading according to the Ultimate Server Tutorial by Cutting Cords and all works perfectly on my machine.

So I can’t reproduce your error unfortunately :pensive:


#12

I’m sorry seems working know maybe the problem was with a serie in concrete.

Thanks for your attention


#13

You’re very welcome and I’m glad it works now :slight_smile:


#14

Is there a way to get this to work with synology. Filebot is available but bat files won’t work… Any help?


#15

You should try the updated version. It doesn’t use a batch file: [Sonarr AutoSubber v3] Cross platform automated multilingual subtitle downloading

Otherwise, you should “translate” the batch file to a Linux bash file, I suppose


#16

+1 bump this . because i am also on Synology.


#17

Did you try what was suggested? Did you try the latest version of the script?