Compare commits
7 Commits
2.6.4.2859
...
2.6.4.2864
| Author | SHA1 | Date | |
|---|---|---|---|
| eb4fa8d85d | |||
| 7e2d5dfa5d | |||
| f785ba8932 | |||
| 63cf4a2d67 | |||
| 9e270bb53f | |||
| 3bafcb6b4e | |||
| 3b50b58aac |
@@ -61,6 +61,10 @@ def AdvancedMenu(randomize=None, header=None, message=None):
|
||||
key=Callback(SkipFindBetterSubtitles, randomize=timestamp()),
|
||||
title=pad_title(_("Skip next find better subtitles (sets last run to now)")),
|
||||
))
|
||||
oc.add(DirectoryObject(
|
||||
key=Callback(SkipRecentlyAddedMissing, randomize=timestamp()),
|
||||
title=pad_title(_("Skip next find recently added with missing subtitles (sets last run to now)")),
|
||||
))
|
||||
oc.add(DirectoryObject(
|
||||
key=Callback(TriggerStorageMaintenance, randomize=timestamp()),
|
||||
title=pad_title(_("Trigger subtitle storage maintenance")),
|
||||
@@ -207,6 +211,19 @@ def SkipFindBetterSubtitles(randomize=None):
|
||||
)
|
||||
|
||||
|
||||
@route(PREFIX + '/skipram')
|
||||
@debounce
|
||||
def SkipRecentlyAddedMissing(randomize=None):
|
||||
task = scheduler.task("SearchAllRecentlyAddedMissing")
|
||||
task.last_run = datetime.datetime.now()
|
||||
|
||||
return AdvancedMenu(
|
||||
randomize=timestamp(),
|
||||
header=_("Success"),
|
||||
message=_("SearchAllRecentlyAddedMissing skipped")
|
||||
)
|
||||
|
||||
|
||||
@route(PREFIX + '/triggermaintenance')
|
||||
@debounce
|
||||
def TriggerStorageMaintenance(randomize=None):
|
||||
|
||||
@@ -90,7 +90,14 @@ def scan_video(pms_video_info, ignore_all=False, hints=None, rating_key=None, pr
|
||||
known_metadata_subs = set()
|
||||
meta_subs = get_subtitles_from_metadata(plex_part)
|
||||
for language, subList in meta_subs.iteritems():
|
||||
lang = Language.fromietf(Locale.Language.Match(language))
|
||||
try:
|
||||
lang = Language.fromietf(Locale.Language.Match(language))
|
||||
except LanguageError:
|
||||
if config.treat_und_as_first:
|
||||
lang = Language.rebuild(list(config.lang_list)[0])
|
||||
else:
|
||||
continue
|
||||
|
||||
if subList:
|
||||
for key in subList:
|
||||
if key.startswith("subzero_md_forced"):
|
||||
|
||||
+2
-2
@@ -13,7 +13,7 @@
|
||||
<key>CFBundleSignature</key>
|
||||
<string>????</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>2.6.4.2859</string>
|
||||
<string>2.6.4.2864</string>
|
||||
<key>PlexFrameworkVersion</key>
|
||||
<string>2</string>
|
||||
<key>PlexPluginClass</key>
|
||||
@@ -32,7 +32,7 @@
|
||||
|
||||
<h1>Sub-Zero for Plex</h1><i>Subtitles done right</i>
|
||||
|
||||
Version 2.6.4.2859
|
||||
Version 2.6.4.2864
|
||||
|
||||
Originally based on @bramwalet's awesome <a href="https://github.com/bramwalet/Subliminal.bundle">Subliminal.bundle</a>
|
||||
|
||||
|
||||
@@ -7,7 +7,8 @@ from subliminal.exceptions import ConfigurationError
|
||||
from subliminal.providers.legendastv import LegendasTVSubtitle as _LegendasTVSubtitle, \
|
||||
LegendasTVProvider as _LegendasTVProvider, Episode, Movie, guess_matches, guessit, sanitize, region, type_map, \
|
||||
raise_for_status, json, SHOW_EXPIRATION_TIME, title_re, season_re, datetime, pytz, NO_VALUE, releases_key, \
|
||||
SUBTITLE_EXTENSIONS
|
||||
SUBTITLE_EXTENSIONS, language_converters
|
||||
from subzero.language import Language
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
@@ -63,6 +64,7 @@ class LegendasTVSubtitle(_LegendasTVSubtitle):
|
||||
|
||||
|
||||
class LegendasTVProvider(_LegendasTVProvider):
|
||||
languages = {Language(*l) for l in language_converters['legendastv'].to_legendastv.keys()}
|
||||
subtitle_class = LegendasTVSubtitle
|
||||
|
||||
def __init__(self, username=None, password=None):
|
||||
|
||||
@@ -3,6 +3,7 @@ import logging
|
||||
|
||||
from subliminal.providers.napiprojekt import NapiProjektProvider as _NapiProjektProvider, \
|
||||
NapiProjektSubtitle as _NapiProjektSubtitle, get_subhash
|
||||
from subzero.language import Language
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
@@ -18,6 +19,7 @@ class NapiProjektSubtitle(_NapiProjektSubtitle):
|
||||
|
||||
|
||||
class NapiProjektProvider(_NapiProjektProvider):
|
||||
languages = {Language.fromalpha2(l) for l in ['pl']}
|
||||
subtitle_class = NapiProjektSubtitle
|
||||
|
||||
def query(self, language, hash):
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
|
||||
from subliminal.providers.subscenter import SubsCenterProvider as _SubsCenterProvider, \
|
||||
SubsCenterSubtitle as _SubsCenterSubtitle
|
||||
from subzero.language import Language
|
||||
|
||||
|
||||
class SubsCenterSubtitle(_SubsCenterSubtitle):
|
||||
@@ -21,6 +22,7 @@ class SubsCenterSubtitle(_SubsCenterSubtitle):
|
||||
|
||||
|
||||
class SubsCenterProvider(_SubsCenterProvider):
|
||||
languages = {Language.fromalpha2(l) for l in ['he']}
|
||||
subtitle_class = SubsCenterSubtitle
|
||||
hearing_impaired_verifiable = True
|
||||
server_url = 'http://www.subscenter.info/he/'
|
||||
|
||||
@@ -21,6 +21,10 @@ class TVsubtitlesSubtitle(_TVsubtitlesSubtitle):
|
||||
|
||||
|
||||
class TVsubtitlesProvider(_TVsubtitlesProvider):
|
||||
languages = {Language('por', 'BR')} | {Language(l) for l in [
|
||||
'ara', 'bul', 'ces', 'dan', 'deu', 'ell', 'eng', 'fin', 'fra', 'hun', 'ita', 'jpn', 'kor', 'nld', 'pol', 'por',
|
||||
'ron', 'rus', 'spa', 'swe', 'tur', 'ukr', 'zho'
|
||||
]}
|
||||
subtitle_class = TVsubtitlesSubtitle
|
||||
|
||||
@region.cache_on_arguments(expiration_time=SHOW_EXPIRATION_TIME)
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
# coding=utf-8
|
||||
from babelfish.exceptions import LanguageError
|
||||
import types
|
||||
|
||||
from babelfish.exceptions import LanguageError
|
||||
from babelfish import Language as Language_, basestr
|
||||
|
||||
|
||||
@@ -34,7 +35,12 @@ def wrap_forced(f):
|
||||
cls = args[0]
|
||||
args = args[1:]
|
||||
s = args.pop(0)
|
||||
base, forced = s.split(":") if ":" in s else (s, False)
|
||||
forced = None
|
||||
if isinstance(s, types.StringTypes):
|
||||
base, forced = s.split(":") if ":" in s else (s, False)
|
||||
else:
|
||||
base = s
|
||||
|
||||
instance = f(cls, base, *args, **kwargs)
|
||||
if isinstance(instance, Language):
|
||||
instance.forced = forced == "forced"
|
||||
|
||||
@@ -403,12 +403,12 @@
|
||||
"forced": "forced",
|
||||
"%s in %s (%s, score: %s), %s": "%s in %s (%s, score: %s), %s",
|
||||
"Extract embedded subtitle streams": "Extract embedded subtitle streams",
|
||||
"Display %(incl_excl_list_name)s (%(count)d)": "Display %(incl_excl_list_name)s list (%(count)d)",
|
||||
"Display %(incl_excl_list_name)s (%(count)d)": "Display %(incl_excl_list_name)s (%(count)d)",
|
||||
"include list": "include list",
|
||||
"ignore list": "ignore list",
|
||||
"Include list": "Include list",
|
||||
"Ignore list": "Ignore list",
|
||||
"Show the current %(incl_excl_list_name)s (mainly used for the automatic tasks)": "Show the current %(incl_excl_list_name)s list (mainly used for the automatic tasks)",
|
||||
"Show the current %(incl_excl_list_name)s (mainly used for the automatic tasks)": "Show the current %(incl_excl_list_name)s (mainly used for the automatic tasks)",
|
||||
"Didn't change the %(incl_excl_list_name)s": "Didn't change the %(incl_excl_list_name)s",
|
||||
"%(title)s added to the include list": "%(title)s added to the include list",
|
||||
"%(title)s removed from the include list": "%(title)s removed from the include list",
|
||||
|
||||
@@ -84,6 +84,13 @@ the.vbm, mmgoodnow, Vertig0ne, thliu78, tattoomees, ostman, count_confucius, ehe
|
||||
|
||||
## Changelog
|
||||
|
||||
2.6.4.2864
|
||||
- core: scanning: don't fail on metadata subtitles with bad language code; fixes #596
|
||||
- providers: legendastv, napiprojekt, subscenter, tvsubtitles: fix "No language to search for" issue; fixes #596
|
||||
- menu: fix "ignore list list"
|
||||
- menu: advanced: add skip next search all recently missing subtitles entry
|
||||
|
||||
|
||||
2.6.4.2859
|
||||
- core: fix thread.lock error (only affected the history menu, not the actual functionality)
|
||||
- core: fix audio-based conditional subtitle decision making; fixes #592
|
||||
|
||||
Reference in New Issue
Block a user