Adjust settings

Emeric edited this page Aug 14, 2016 · 16 revisions

You can adjust so many settings to make OpenSubtitlesDownload.py even better!

Change search language

Edit your OpenSubtitlesDownload.py file and look for the "Language settings" section.

Language

Find the opt_languages setting and change it with the search language you want. You will need to use a 3-letter (ISO 639-2) language code. You can check this Language list, or use the one from opensubtitles.org. The default language is set to English.

opt_languages = ['eng']

You can also search for subtitles in several languages ​​at once. To do that, you need to change the opt_languages setting like this:

Option 1 download the first language available only > recommanded

opt_languages = ['eng,fre'] # this example will use English and French
  • If there is only one subtitle found (either English or French), it will be automatically downloaded.
  • If there is several subtitles found (either English and/or French), the user will see the "selection window" with all subtitles found in it, and can choose which subtitle he want with the help of a "language" column.

Option 2 download all selected languages > arguably harder to understand and use right

opt_languages = ['eng','fre'] # this example will use English and French
  • If there is only one subtitle found (either English or French), it will be automatically downloaded.
  • If there is only one English AND one French subtitle found, they will be automatically downloaded.
  • If there is several subtitles found (English and/or French), the user will see a different "selection window" for each language.

Language suffix

The opt_language_suffix setting let you decide whether or not embed language codes into the subtitles file name. You can also customize the separator!

opt_language_suffix = 'auto'
opt_language_separator = '_'

The subtitles files will look like this when this feature is enabled:

/videos/mymovie.mp4
/videos/mymovie_en.srt
/videos/mymovie_fr.srt

Use the "search by filename"

Edit your OpenSubtitlesDownload.py file and look for the "GUI settings" section.

Find the opt_backup_searchbyname setting, and set it to either:

  • on (default) (search subtitles using the file name if the search by movie hash fails)
  • off (exit if the search by movie hash fails)

Automatic or manual selection mode?

Edit your OpenSubtitlesDownload.py file and look for the "GUI settings" section.

Find the opt_selection_mode setting and change it with one of the two modes available:

  • manual (default) (will let you choose the subtitles you want if more than one result is available)
  • auto (for a fully automatic subtitles search and download)

GUI settings

GUI selection

Edit your OpenSubtitlesDownload.py file and look for the first item in the "Settings" section.

# Select your GUI:
opt_gui = 'auto'

You can use this setting to force a GUI if the autodetection isn't good enough for you. This setting can also be overriden at run time with '--gui=xxx'.

  • auto (autodetect, fallback on CLI)
  • gnome (GNOME/GTK based environments, using 'zenity' backend)
  • kde (KDE/Qt based environments, using 'kdialog' backend)
  • cli (Command Line Interface)

Subtitle selection windows

Edit your OpenSubtitlesDownload.py file and look for "GUI settings" section. You can change the width and the height of the subtitles selection windows. Values are in pixels.

# You can change the subtitle selection GUI size:
opt_gui_width  = 720
opt_gui_height = 320

Subtitle selection settings

You can also choose to show or hide additional columns from the slection windows:

opt_selection_language = 'auto'  # Show subtitles language
opt_selection_hi       = 'auto'  # Is it a subtitles with Hearing Impaired informations
opt_selection_rating   = 'off'   # User rating for the subtitles
opt_selection_count    = 'off'   # Number of user downloads for the subtitle

If you choose "auto", these additional columns will only be displayed if they contains valuable informations. For instance the "language" will only be displayed if you are looking for multiples languages at once, and the HI column will only be displayed if at least one of the subtitles found has hearing impaired informations.