1
0
Fork 0
mirror of https://github.com/morpheus65535/bazarr synced 2024-12-30 19:46:25 +00:00
bazarr/libs/subliminal_patch/providers/subscenter.py
Louis Vézina 3ca2c98cd4 WIP
2019-09-16 22:04:27 -04:00

30 lines
1.2 KiB
Python

# coding=utf-8
from __future__ import absolute_import
from subliminal.providers.subscenter import SubsCenterProvider as _SubsCenterProvider, \
SubsCenterSubtitle as _SubsCenterSubtitle
from subzero.language import Language
class SubsCenterSubtitle(_SubsCenterSubtitle):
hearing_impaired_verifiable = True
def __init__(self, language, hearing_impaired, page_link, series, season, episode, title, subtitle_id, subtitle_key,
subtitle_version, downloaded, releases):
super(SubsCenterSubtitle, self).__init__(language, hearing_impaired, page_link, series, season, episode, title,
subtitle_id, subtitle_key,
subtitle_version, downloaded, releases)
self.release_info = u", ".join(releases)
self.page_link = page_link
def __repr__(self):
return '<%s %r %s [%s]>' % (
self.__class__.__name__, self.page_link, self.id, self.language)
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/'