Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix disabled providers #1181

Merged
merged 4 commits into from
Oct 29, 2024
Merged

Fix disabled providers #1181

merged 4 commits into from
Oct 29, 2024

Conversation

getzze
Copy link
Collaborator

@getzze getzze commented Oct 18, 2024

Remove 'addic7ed' and 'napiprojekt' from the list of disabled providers.

Fix a bug happening when using subliminal as a library for scripting and a new provider is defined.
You needed to add the new provider to the default_provider list to be able to download subtitles easily.

>>> class MyProvider(Provider): pass
>>> provider_manager.register('myprovider = __main__.MyProvider')
>>> subtitles = list_subtitles([video], {Language('hun')}, providers=['myprovider'])
# a list of subtitles from myprovider matching the video.
>>> download_subtitles(subtitles)
# nothing happened, because myprovider is not in the default list. You needed to use:
>>> download_subtitles(subtitles, providers=['myprovider'])
# subtitles are downloaded
# with this PR, no need to add the 'providers' argument to 'download_subtitles'

Now the default_provider list is computed dynamically.
This was not affecting the CLI.

@getzze getzze merged commit 0f72149 into Diaoul:main Oct 29, 2024
23 checks passed
@getzze getzze deleted the fix-disabled_providers branch October 29, 2024 16:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant