Private GIT

Skip to content
Snippets Groups Projects
Commit 4b51f65e authored by medariox's avatar medariox
Browse files

Updated guessit to 1.0.2, updated babelfish to 0.5.5 final, removed superfluous padding

parent 8fcaa5f6
No related branches found
No related tags found
No related merge requests found
......@@ -2960,7 +2960,6 @@ li.token-input-token {
}
li.token-input-token img {
padding-top: 3px;
padding-right: 4px;
float: left;
}
......
......@@ -82,7 +82,10 @@ class Country(CountryMeta(str('CountryBase'), (object,), {})):
self.alpha2 = state
def __getattr__(self, name):
try:
return country_converters[name].convert(self.alpha2)
except KeyError:
raise AttributeError(name)
def __hash__(self):
return hash(self.alpha2)
......
......@@ -283,6 +283,11 @@ class TestLanguage(TestCase, _Py26FixTestCase):
self.assertTrue(hasattr(Language('fra'), 'alpha2'))
self.assertFalse(hasattr(Language('bej'), 'alpha2'))
def test_country_hasattr(self):
self.assertTrue(hasattr(Country('US'), 'name'))
self.assertTrue(hasattr(Country('FR'), 'alpha2'))
self.assertFalse(hasattr(Country('BE'), 'none'))
def test_country(self):
self.assertEqual(Language('por', 'BR').country, Country('BR'))
self.assertEqual(Language('eng', Country('US')).country, Country('US'))
......
......@@ -17,4 +17,4 @@
# You should have received a copy of the Lesser GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
__version__ = '0.11.1.dev0'
__version__ = '1.0.2'
......@@ -237,7 +237,7 @@ def find_possible_languages(string, allowed_languages=None):
key = 'subtitleLanguage'
for suffix in subtitle_suffixes:
if lang_word.endswith(suffix):
lang_word = lang_word[:len(suffix)]
lang_word = lang_word[:len(suffix)-1]
key = 'subtitleLanguage'
for prefix in lang_prefixes:
if lang_word.startswith(prefix):
......
File deleted
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment