mirror of
https://github.com/morpheus65535/bazarr.git
synced 2024-11-10 17:13:35 +08:00
subssabbz, subsunacs - fix inconsistent movie naming
This commit is contained in:
parent
4c19622456
commit
408d0cd253
2 changed files with 13 additions and 2 deletions
|
@ -43,6 +43,11 @@ def fix_tv_naming(title):
|
|||
}, True)
|
||||
|
||||
|
||||
def fix_movie_naming(title):
|
||||
return fix_inconsistent_naming(title, {"Back to the Future Part": "Back to the Future",
|
||||
}, True)
|
||||
|
||||
|
||||
class SubsSabBzSubtitle(Subtitle):
|
||||
"""SubsSabBz Subtitle."""
|
||||
provider_name = 'subssabbz'
|
||||
|
@ -147,7 +152,7 @@ class SubsSabBzProvider(Provider):
|
|||
params['movie'] = "%s %02d %02d" % (sanitize(fix_tv_naming(video.series), {'\''}), video.season, video.episode)
|
||||
else:
|
||||
params['yr'] = video.year
|
||||
params['movie'] = sanitize(video.title, {'\''})
|
||||
params['movie'] = sanitize(fix_movie_naming(video.title), {'\''})
|
||||
|
||||
if language == 'en' or language == 'eng':
|
||||
params['select-language'] = 1
|
||||
|
|
|
@ -43,6 +43,12 @@ def fix_tv_naming(title):
|
|||
}, True)
|
||||
|
||||
|
||||
def fix_movie_naming(title):
|
||||
return fix_inconsistent_naming(title, {"Back to the Future Part III": "Back to the Future 3",
|
||||
"Back to the Future Part II": "Back to the Future 2",
|
||||
}, True)
|
||||
|
||||
|
||||
class SubsUnacsSubtitle(Subtitle):
|
||||
"""SubsUnacs Subtitle."""
|
||||
provider_name = 'subsunacs'
|
||||
|
@ -147,7 +153,7 @@ class SubsUnacsProvider(Provider):
|
|||
params['m'] = "%s %02d %02d" % (sanitize(fix_tv_naming(video.series), {'\''}), video.season, video.episode)
|
||||
else:
|
||||
params['y'] = video.year
|
||||
params['m'] = sanitize(video.title, {'\''})
|
||||
params['m'] = sanitize(fix_movie_naming(video.title), {'\''})
|
||||
|
||||
if language == 'en' or language == 'eng':
|
||||
params['l'] = 1
|
||||
|
|
Loading…
Reference in a new issue