-
-
Notifications
You must be signed in to change notification settings - Fork 596
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update subliminal to 2.0.rc1 (b48c0c9) VANILLA!
Adds shooter.cn provider Removes itasa provider until it can be finalized into upstream since it downloads incorrect subtitles #1457 Removes napiprojekt Diaoul/subliminal#536 Replaces #1315
- Loading branch information
Showing
27 changed files
with
715 additions
and
972 deletions.
There are no files selected for viewing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
# -*- coding: utf-8 -*- | ||
from babelfish import LanguageReverseConverter | ||
|
||
from ..exceptions import ConfigurationError | ||
|
||
|
||
class ShooterConverter(LanguageReverseConverter): | ||
def __init__(self): | ||
self.from_shooter = {'chn': ('zho',), 'eng': ('eng',)} | ||
self.to_shooter = {v: k for k, v in self.from_shooter.items()} | ||
self.codes = set(self.from_shooter.keys()) | ||
|
||
def convert(self, alpha3, country=None, script=None): | ||
if (alpha3,) in self.to_shooter: | ||
return self.to_shooter[(alpha3,)] | ||
|
||
raise ConfigurationError('Unsupported language for shooter: %s, %s, %s' % (alpha3, country, script)) | ||
|
||
def reverse(self, shooter): | ||
if shooter in self.from_shooter: | ||
return self.from_shooter[shooter] | ||
|
||
raise ConfigurationError('Unsupported language code for shooter: %s' % shooter) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.