Sub-Zero for Plex, 1.1-RC5.1
Subtitles done right
Originally based on @bramwalet's awesome Subliminal.bundle
Plex forum thread: https://forums.plex.tv/discussion/186575
Quick installation
- go to
Library/Application Support/Plex Media Server/Plug-ins/ rm -r Sub-Zero.bundle LocalMediaExtended.bundlewget https://github.com/pannal/Sub-Zero/releases/download/1.1-rc5.1/Sub-Zero-1.1-rc5.1.zipunzip Sub-Zero-1.1-rc5.1.zip- more indepth: look below on
Installation
Usage
Use the following agent order:
- Sub-Zero TV/Movie Subtitles
- Local Media Assets Extended
- anything else
- again, DISABLE Local Media Assets!
Encountered a bug?
- be sure to post your logs:
Library/Application Support/Plex Media Server/Logs/PMS Plugin Logs/com.plexapp.agents.subzero.log; there may be multiple logs (com.plexapp.agents.subzero.log.*) depending on the amount of Videos you're refreshing - Remember: before you open a bug-ticket please double-check, that you've deleted the Sub-Zero.bundle folder BEFORE every update (to avoid .pyc leftovers)
Changelog
RC-5.1
- make hearing_impaired option more configurable and clear (see #configuration-)
RC-5
- fix wrong video type matching by hinting video type to guessit
- update to newest LocalMediaExtended.bundle (incorporated plex-inc's changes)
- show page links for subtitles in log file instead of subtitle ID
- add custom language setting in addition to the three hardcoded ones
- if a subtitle doesn't match our hearing_impaired setting, ignore it
- add an optional boost for addic7ed subtitles, if their series, season, episode, year, and format (e.g. WEB-DL) matches
RC-4
- rename project to Sub-Zero
- incorporate LocalMediaExtended.bundle
- making this a multi-bundle plugin
- update default scores
- add icon
RC-3
- addic7ed/tvsubtitles: punctuation fixes (correctly get show ids for series like "Mr. Poopster" now)
- podnapisi: fix logging
- opensubtitles: add login credentials (for VIPs)
- add retry functionality to retry failed subtitle downloads, including configurable amount of retries until discarding of provider
- move possibly not needed setting "Restrict to one language" to the bottom
- more detailed logging
- some cleanup
RC-2
- fix empty custom subtitle folder creation
- fix detection of existing embedded subtitles (switch to https://github.com/tonswieb/enzyme)
- better logging
- set default TV score to 15; movie score to 30
RC-1
- fix subliminal's logging error on min_score not met (fixes #15)
- separated tv and movies subtitle scores settings (fixes #16)
- add option to save only one subtitle per video (skipping the ".lang." naming scheme plex supports) (fixes #3)
beta5
- fix storing subtitles besides the actual video file, not subfolder (fixes #14)
- "custom folder" setting now always used if given (properly overrides "subtitle folder" setting)
- also scan (custom) given subtitle folders for existing subtitles instead of redownloading them on every refresh (fixes #9, #2)
beta4
increased score of addic7ed subtitles a bit(not existing currently)- support for newest Subliminal (1.0.1) and guessit (0.11.0)
- plugin now also works with com.plexapp.agents.thetvdbdvdorder
- providers fixed for subliminal 1.0.1 (at least addic7ed)
- providers don't simply fail and get excluded on non-detected language
- support for addic7ed languages: French (Canadian)
- support for additional languages: pt-br (Portuguese (Brasil)), fa (Persian (Farsi))
- support for three (two optional) subtitle languages
- optionally use random user agent for addic7ed provider (should not be needed)
Description
Plex Metadata agent plugin based on Subliminal. This agent will search on the following sites for the best matching subtitles:
- OpenSubtitles
- TheSubDB
- Podnapisi.NET
- Addic7ed
- TVsubtitles.net
All providers can be disabled or enabled on a per provider setting. Certain preferences change the behaviour of subliminal, for instance the minimum score of subtitles to download, or whether to download hearing impaired subtitles or not. The agent stores the subtitles as metadata, but can be configured (See Configuration) to store it next to the media files.
Installation
See article on Plex website.
Configuration
**outdated Several options are provided in the preferences of this agent.
- Addic7ed username/password: Provide your addic7ed username here, otherwise the provider won't work. Please make sure your account is activated, before using the agent.
- Subtitle language (1)/(2)/(3): Your preferred languages to download subtitles for.
- Additional Subtitle Languages: Additional languages to download; comma-separated; use ISO-639-1 codes)
- Provider: Enable ...: Enable/disable this provider. Affects both movies and series.
- Addic7ed: boost over hash score if requirements met: if an Addic7ed subtitle matches the video's series, season, episode, year, and format (e.g. WEB-DL), boost its score, possibly over OpenSubtitles/TheSubDB direct hash match
- Scan: Include embedded subtitles: When enabled, subliminal finds embedded subtitles that are already present within the media file.
- Scan: Include external subtitles: When enabled, subliminal finds subtitles located near the media file on the filesystem.
- Minimum score for download: When configured, what is the minimum score for subtitles to download them? Lower scored subtitles are not downloaded.
- Download hearing impaired subtitles:
- "prefer": score subtitles for hearing impaired higher
- "don't prefer": score subtitles for hearing impaired lower
- "force HI": skip subtitles if the hearing impaired flag isn't set
- "force non-HI": skip subtitles if the hearing impaired flag is set
- Store subtitles next to media files (instead of metadata): See Store as metadata or on filesystem
- Subtitle folder: See Store as metadata or on filesystem
- Custom Subtitle folder: See Store as metadata or on filesystem
Store as metadata or on filesystem
By default, Plex stores posters, fan art and subtitles as metadata in a separate folder which is not managed by the user. This is the default behaviour of this agent. However, expert users can enable 'Store subtitles next to media files'. The agent will write the subtitle files in the media folder. The setting 'Subtitle folder' configures in which folder (current folder or other subfolder) the subtitles are stored. The expert user can also supply 'Custom Subtitle folder' which can also be an absolute path.
Please note that you need a way to pick up external subtitles to show up in the Plex Media server. When the subtitles are stored next to your media folders, it is sufficient to enable Local Media agent and place it below the Subliminal agent in the agent priorities. When a subfolder (either custom or predefined) is used, you need LocalMediaExtended.
License
MIT
Libraries
Uses the following libraries and their LICENSE:
- babelfish (BSD-3-Clause)
- beautifulsoup4 (MIT)
- chardet (LGPL)
- dogpile.core (BSD)
- dogpile.cache (BSD)
- enzyme (Apache 2.0)
- guessit (LGPLv3)
- html5lib (MIT)
- pysrt (GPLv3)
- requests (Apache 2.0)
- stevedore (Apache)
- subliminal (MIT)
- xdg (LGPLv2)
- setuptools (PSF ZPL)
