-
-
Notifications
You must be signed in to change notification settings - Fork 14
Subliminal Configuration File
An NZB-Subliminal configuration file allows you to pre-define a default behaviour you expect from the tool. This is the ideal solution for SABnzbd users who can't otherwise tell the program how to behave for them when it can be automated.
This wiki will explain what is involved in setting up your own configuration file.
The file must be called Subliminal.ini and placed in the same directory as the Subliminal.py file. Out of the box, NZB-Subliminal ships with a Subliminal.ini.sample file with a good starting point. Feel free to take this file and rename it to Subliminal.ini to get yourself started.
The configuration file works on the classic python ini structure to which everything must reside under a [main] heading.
# NZB-Subliminal expects a [main] at the start! this is very important!
[main]
# Comments can be placed with a hash-tag (#)
OptionA: Value
OptionB: Value
So knowing the configuration's simple structure, here is what you can identify the directives that NZB-Subliminal can interpret and set for you:
# this is Subliminal.ini which resides in the same directory as Subliminal.py
[main]
# Update the timestamp of the file(s) just downloaded. This is a really good
# idea for all SABnzbd users!! It provides us a reference time to the video you
# just downloaded.
UpdateTimestamp: Yes
# List of language codes.
#
# Language code according to ISO 639-1.
# Few examples: English - en, German - de, Dutch - nl, French - fr.
# For the full list of language codes see
# http://www.loc.gov/standards/iso639-2/php/English_list.php.
# Language Setting
#
# Subtitles for multiple languages can be downloaded. Separate multiple
# languages with some type of delimiter (space, comma, etc)
# codes with commas. Example: en, fr
Languages: en
# Subliminal Single Mode Setting (yes, no).
#
# Download content without the language code in the subtitles filename.
# NOTE: this is forced to 'no' in the event more then one Language
# is specified (on previous directive above)
Single: yes
# The Category (if detected from the NZB-File) to classify the video as a
# tv (vs a movie). This just allows you more control later on when specifying
# what providers to use. The default below is perfectly okay; there is
# no reason to change this value unless you know what you're doing.
TvCategories: tv
# Subtitle Fetch Mode (ImpairedOnly, StandardOnly, BestScore, ImpairedFirst, StandardFirst).
#
# Define the types of subtitles you would like to scan for, the options
# break down as follows:
# ImpairedOnly - Only download hearing-impaired subtitles.
# StandardOnly - Only download non hearing-impaired subtitles.
# BestScore - Download the best matching subtitles reguardless of if they
# are flagged for the hearing-impaired or not.
# ImpairedFirst - Attempt to download the hearing-impaired subtitles
# first. In the event that they there are not available,
# then attempt to acquire the non hearing-impaired versions
# instead.
# StandardFirst - Attempt to download the standard (non hearing-impaired)
# subtitles first. In the event that they are not available,
# then attempt to acquire the the hearing-impaired versions
# instead.
FetchMode: BestScore
# Search Mode (basic, advanced).
#
# basic - presumed subtitles are guessed based on the (deobsfucated)
# filename alone. If you're using SABnzbd and are using it's
# 'sorting' feature (where it handles the deobsfucation for you),
# then you don't need to used the advance mode; basic will
# work fine.
# advanced - presumed subtiltes are guessed based on the (deobsfucated)
# filename (same as basic). But further processing occurs to
# help obtain more accurate results. Meta data extracted from
# the actual video in question such as it's length, FPS, and
# encoding (including if subs are already included or not).
# This mode yields the best results but at the cost of additional
# time and CPU.
SearchMode: advanced
# Uncomment these if you have a login you wish to use for Addi7ed
# Addic7edUser: somedude
# Addic7edPass: hispassword
# Ignore Embedded Subtitle Matching (yes, no).
#
# Identify how you want to handle embedded subititles if they are detected
# in the video file being scanned. If you set this value to 'no', you will
# use match embedded subtitles instead and no further script processing
# will take place.
# If you set this to 'yes', The script will then attempt to detect any embedded
# subtitles already present with the video (in addition to their languages). If
# the language is already present then no further processing is done.
# NOTE: Embedded subtitles can only be detected if you are using the advanced
# search mode identified above. Therefore this switch has no bearing
# on a Basic check.
# NOTE: This feature can not detect hard-coded subtitles; these are ones that are
# permanently embedded in the video itself.
IgnoreEmbedded: no
# Minimum File Score
#
# When more then one subtitle is matched against a video, they are individually
# scored based on their likelyhood of being an exact match to the video they
# are being searched on. The highest scored match is the chosen one at the
# end of the day. A high score (almost perfect) is 50ish, but most videos
# score in the high 30's and low 40's. This score identifies the elimination
# which subtitles should not even be considered if it scores this value or
# lower. If you set this too high, you'll never match any subtitles. If
# you set this too low, you'll almost always acqurie a subtitle for the video
# in question, but it may not be the correct one.
# If 0 is specified, the default value assigned by the subliminal core
# application will be used.
MinScore: 20
# The providers you want to explicilty reference. By default all of them are
# checked... but here you can filter the list if you choose:
Providers: opensubtitles, tvsubtitles, podnapisi, addic7ed, thesubdb
# My version of subliminal is significantly forked/altered from the original one
# so you can also help the filtering and accuracy of your response by telling
# the tool what to use when the nzb is detected to be either a movie or tv show
# by default these are not set (but it's really worth doing!) :)
MovieProviders: opensubtitles, podnapisi, thesubdb
# If we detect the video file is for TV Show's only, then we just search the
# following providers. Comment this entry out if you just want to use the
# default values (defined by 'Providers' above).
TVShowProviders: tvsubtitles, addic7ed
# Force Subtitle Encoding (None, UTF-8, UTF-16, ISO-8859-1, ISO-8859-2).
#
# Force the encoding of a subtitle file to be of a certain type. If set to
# None, then the subtitle will left as it was retrieved.
# - UTF-8: This is the encoding used by most Linux/Unix filesystems. just
# check the global variable $LANG to see if that's what you are.
# - UTF-16: This is the encoding usually used by OS/X systems and NTFS.
# - ISO-8859-1: Also referred to as Latin-1; Microsoft Windows used this
# encoding for years (in the past), and still do in some
# cases. It supports the English, Spanish, and French language
# character sets.
# - ISO-8859-2: Also referred to as Latin-2; It supports Czech, German,
# Hungarian, Polish, Romanian, Croatian, Slovak, and
# Slovene character sets.
#
# If you wish to add another encoding; just email me and i'll add it.
ForceEncoding: None
# My Systems File Encoding (UTF-8, UTF-16, ISO-8859-1, ISO-8859-2).
#
# All systems have their own encoding; here is a loose guide you can use
# to determine what encoding you are (if you're not sure):
# - UTF-8: This is the encoding used by most Linux/Unix filesystems. just
# check the global variable $LANG to see if that's what you are.
# - UTF-16: This is the encoding usually used by OS/X systems and NTFS.
# - ISO-8859-1: Also referred to as Latin-1; Microsoft Windows used this
# encoding for years (in the past), and still do in some
# cases. It supports the English, Spanish, and French language
# character sets.
# - ISO-8859-2: Also referred to as Latin-2; It supports Czech, German,
# Hungarian, Polish, Romanian, Croatian, Slovak, and
# Slovene character sets.
#
# If you wish to add another encoding; just email me and i'll add it.
# All files that are downloaded will be written to your filesystem using
# the same encoding your operating system uses. Since there is no way
# to detect this (yet), by specifying it here, you can make it possible
# to handle files with the extended character sets.
#
SystemEncoding: UTF-8
# Cross Reference File Paths.
#
# Specify directories local to NZBGet that contain subtitles previously
# downloaded. Once found, they'll be automatically moved over and will
# take priority over actually checking the internet. You can specify
# more then one local directory using the space (and or comma) to
# delimit each entry.
# Uncomment the below if you have a path you wish to check prior to
# downloading subs)
# XRefPaths:
# Maximum File Age
#
# The maximum amount of time that can elapse before we can assume that if
# there are still no subtitles after this duration, then there never will
# be. This option prevents thrashing and requesting subtitles for something
# over and over again for no reason. This value is identified in hours
# relative to each file checked.
#
# NOTE: This option is only applied to Scheduling.
MaxAge: 24
# Overwrite Mode (yes, no).
#
# Overwrite subtitles even if they previously exist.
# NOTE: This option is only applied to Post Processing.
Overwrite: no
# Setting this to yes before creating a ticket would 'really' help me debug
# any strange issues you have.
Debug: no
Note: If you provide a configuration file with an directive missing, then it's default value (defined above) is used. This is useful to know because it means you don't have to have a complicated configuration file if the default entries are already adequate enough.