[suboob] language hashtable moved from opensubtitles backend to application

This commit is contained in:
Julien Veyssier 2013-03-12 20:50:08 +01:00
commit e98008338a
6 changed files with 33 additions and 26 deletions

View file

@ -18,10 +18,10 @@
# along with weboob. If not, see <http://www.gnu.org/licenses/>.
from weboob.capabilities.subtitle import ICapSubtitle,LanguageNotSupported
from weboob.applications.suboob.suboob import LANGUAGE_CONV
from weboob.tools.backend import BaseBackend
from .browser import OpensubtitlesBrowser
from .pages import LANGUAGE_CONV
from urllib import quote_plus

View file

@ -19,8 +19,9 @@
from weboob.tools.browser import BaseBrowser
from weboob.applications.suboob.suboob import LANGUAGE_CONV
from .pages import SubtitlesPage, SearchPage, SubtitlePage, LANGUAGE_CONV
from .pages import SubtitlesPage, SearchPage, SubtitlePage
__all__ = ['OpensubtitlesBrowser']

View file

@ -21,29 +21,12 @@
from weboob.capabilities.subtitle import Subtitle
from weboob.capabilities.base import NotAvailable
from weboob.tools.browser import BasePage
from weboob.applications.suboob.suboob import LANGUAGE_CONV
__all__ = ['SubtitlesPage','SubtitlePage','SearchPage']
LANGUAGE_CONV = {
'ar':'ara', 'eo':'epo', 'ga':'', 'ru':'rus',
'af':'' , 'et':'est', 'it':'ita', 'sr':'scc',
'sq':'alb', 'tl':'' , 'ja':'jpn', 'sk':'slo',
'hy':'arm', 'fi':'fin', 'kn':'', 'sl':'slv',
'az':'' , 'fr':'fre', 'ko':'kor', 'es':'spa',
'eu':'baq', 'gl':'glg', 'la':'', 'sw':'swa',
'be':'' , 'ka':'geo', 'lv':'lav', 'sv':'swe',
'bn':'ben', 'de':'ger', 'lt':'lit', 'ta':'',
'bg':'bul', 'gr':'ell', 'mk':'mac', 'te':'tel',
'ca':'cat', 'gu':'' , 'ms':'may', 'th':'tha',
'zh':'chi', 'ht':'' , 'mt':'', 'tr':'tur',
'hr':'hrv', 'iw':'heb', 'no':'nor', 'uk':'ukr',
'cz':'cze', 'hi':'hin', 'fa':'per', 'ur':'urd',
'da':'dan', 'hu':'hun', 'pl':'pol', 'vi':'vie',
'nl':'dut', 'is':'ice', 'pt':'por', 'cy':'',
'en':'eng', 'id':'ind', 'ro':'rum', 'yi':''}
class SearchPage(BasePage):
""" Page which contains results as a list of movies
"""