diff --git a/docs/api/providers.rst b/docs/api/providers.rst index 582bc8b0..b39e79f5 100644 --- a/docs/api/providers.rst +++ b/docs/api/providers.rst @@ -7,6 +7,11 @@ Addic7ed .. automodule:: subliminal.providers.addic7ed :private-members: +Gestdown +-------- +.. automodule:: subliminal.providers.gestdown + :private-members: + NapiProjekt ----------- .. automodule:: subliminal.providers.napiprojekt @@ -17,6 +22,11 @@ OpenSubtitles .. automodule:: subliminal.providers.opensubtitles :private-members: +OpenSubtitles.com +----------------- +.. automodule:: subliminal.providers.opensubtitlescom + :private-members: + Podnapisi --------- .. automodule:: subliminal.providers.podnapisi diff --git a/docs/user/how_it_works.rst b/docs/user/how_it_works.rst index e321c48e..6885278e 100644 --- a/docs/user/how_it_works.rst +++ b/docs/user/how_it_works.rst @@ -7,9 +7,11 @@ Subliminal uses multiple providers to give users a vast choice and have a better subtitles. Current supported providers are: * Addic7ed +* Gestdown * LegendasTV * NapiProjekt * OpenSubtitles +* OpenSubtitles.com * Podnapisi * Shooter * TheSubDB diff --git a/setup.py b/setup.py index e0dd4fb2..e04a9cb1 100644 --- a/setup.py +++ b/setup.py @@ -71,8 +71,10 @@ def find_version(*file_paths): 'subliminal.providers': [ 'addic7ed = subliminal.providers.addic7ed:Addic7edProvider', 'argenteam = subliminal.providers.argenteam:ArgenteamProvider', + 'gestdown = subliminal.providers.gestdown:GestdownProvider', 'napiprojekt = subliminal.providers.napiprojekt:NapiProjektProvider', 'opensubtitles = subliminal.providers.opensubtitles:OpenSubtitlesProvider', + 'opensubtitlescom = subliminal.providers.opensubtitlescom:OpenSubtitlesComProvider', 'podnapisi = subliminal.providers.podnapisi:PodnapisiProvider', 'shooter = subliminal.providers.shooter:ShooterProvider', 'thesubdb = subliminal.providers.thesubdb:TheSubDBProvider', @@ -86,6 +88,7 @@ def find_version(*file_paths): ], 'babelfish.language_converters': [ 'addic7ed = subliminal.converters.addic7ed:Addic7edConverter', + 'opensubtitlescom = subliminal.converters.opensubtitlescom:OpenSubtitlesComConverter', 'shooter = subliminal.converters.shooter:ShooterConverter', 'thesubdb = subliminal.converters.thesubdb:TheSubDBConverter', 'tvsubtitles = subliminal.converters.tvsubtitles:TVsubtitlesConverter' diff --git a/subliminal/cli.py b/subliminal/cli.py index 4f9bd553..94c3ee85 100644 --- a/subliminal/cli.py +++ b/subliminal/cli.py @@ -241,13 +241,15 @@ def convert(self, value, param, ctx): @click.option('--legendastv', type=click.STRING, nargs=2, metavar='USERNAME PASSWORD', help='LegendasTV configuration.', hidden=True) @click.option('--opensubtitles', type=click.STRING, nargs=2, metavar='USERNAME PASSWORD', help='OpenSubtitles configuration.') +@click.option('--opensubtitlescom', type=click.STRING, nargs=2, metavar='USERNAME PASSWORD', + help='OpenSubtitles.com configuration.') @click.option('--omdb', type=click.STRING, nargs=1, metavar='APIKEY', help='OMDB API key.') @click.option('--cache-dir', type=click.Path(writable=True, file_okay=False), default=dirs.user_cache_dir, show_default=True, expose_value=True, help='Path to the cache directory.') @click.option('--debug', is_flag=True, help='Print useful information for debugging subliminal and for reporting bugs.') @click.version_option(__version__) @click.pass_context -def subliminal(ctx, addic7ed, legendastv, opensubtitles, omdb, cache_dir, debug): +def subliminal(ctx, addic7ed, legendastv, opensubtitles, opensubtitlescom, omdb, cache_dir, debug): """Subtitles, faster than your thoughts.""" # create cache directory try: @@ -280,6 +282,15 @@ def subliminal(ctx, addic7ed, legendastv, opensubtitles, omdb, cache_dir, debug) if opensubtitles: ctx.obj['provider_configs']['opensubtitles'] = {'username': opensubtitles[0], 'password': opensubtitles[1]} ctx.obj['provider_configs']['opensubtitlesvip'] = {'username': opensubtitles[0], 'password': opensubtitles[1]} + if opensubtitlescom: + ctx.obj['provider_configs']['opensubtitlescom'] = { + 'username': opensubtitlescom[0], + 'password': opensubtitlescom[1], + } + ctx.obj['provider_configs']['opensubtitlescomvip'] = { + 'username': opensubtitlescom[0], + 'password': opensubtitlescom[1], + } # refiner configs if omdb: diff --git a/subliminal/extensions.py b/subliminal/extensions.py index 83c489a6..3c734aeb 100644 --- a/subliminal/extensions.py +++ b/subliminal/extensions.py @@ -103,7 +103,7 @@ def unregister(self, entry_point): ]) #: Disabled providers -disabled_providers = ['addic7ed', 'napiprojekt', 'opensubtitlesvip', 'shooter'] +disabled_providers = ['addic7ed', 'napiprojekt', 'opensubtitlesvip', 'opensubtitlescomvip', 'shooter'] #: Default enabled providers default_providers = [p for p in provider_manager.names() if p not in disabled_providers] diff --git a/subliminal/refiners/hash.py b/subliminal/refiners/hash.py index 88e31f5a..5de38406 100644 --- a/subliminal/refiners/hash.py +++ b/subliminal/refiners/hash.py @@ -10,6 +10,8 @@ 'napiprojekt': hash_napiprojekt, 'opensubtitles': hash_opensubtitles, 'opensubtitlesvip': hash_opensubtitles, + 'opensubtitlescom': hash_opensubtitles, + 'opensubtitlescomvip': hash_opensubtitles, 'shooter': hash_shooter, 'thesubdb': hash_thesubdb }