aboutsummaryrefslogtreecommitdiffhomepage
path: root/custom_libs/subliminal_patch/providers/embeddedsubtitles.py
diff options
context:
space:
mode:
authorJayZed <[email protected]>2024-09-29 21:05:46 -0400
committerJayZed <[email protected]>2024-09-29 21:05:46 -0400
commitc2a1e4d62c1bbb372127a78e4419a96d3c00e81c (patch)
treeaf19b97bbb71b514ef39928e55769fa85064e23a /custom_libs/subliminal_patch/providers/embeddedsubtitles.py
parent4cc6806193127f9d6d3f2dab26969471d9bbf159 (diff)
parent0200bb96d98127ee32b6b66f8d6b9e21d4571a4d (diff)
downloadbazarr-c2a1e4d62c1bbb372127a78e4419a96d3c00e81c.tar.gz
bazarr-c2a1e4d62c1bbb372127a78e4419a96d3c00e81c.zip
Merge branch 'development' of https://github.com/morpheus65535/bazarr into developmentv1.4.5-beta.7
Diffstat (limited to 'custom_libs/subliminal_patch/providers/embeddedsubtitles.py')
-rw-r--r--custom_libs/subliminal_patch/providers/embeddedsubtitles.py9
1 files changed, 7 insertions, 2 deletions
diff --git a/custom_libs/subliminal_patch/providers/embeddedsubtitles.py b/custom_libs/subliminal_patch/providers/embeddedsubtitles.py
index 002f439b7..2d8a492c7 100644
--- a/custom_libs/subliminal_patch/providers/embeddedsubtitles.py
+++ b/custom_libs/subliminal_patch/providers/embeddedsubtitles.py
@@ -112,7 +112,11 @@ class EmbeddedSubtitlesProvider(Provider):
# Default is True
container.FFMPEG_STATS = False
- tags.LANGUAGE_FALLBACK = self._fallback_lang if self._unknown_as_fallback and self._fallback_lang else None
+ tags.LANGUAGE_FALLBACK = (
+ self._fallback_lang
+ if self._unknown_as_fallback and self._fallback_lang
+ else None
+ )
logger.debug("Language fallback set: %s", tags.LANGUAGE_FALLBACK)
def initialize(self):
@@ -194,7 +198,7 @@ class EmbeddedSubtitlesProvider(Provider):
def download_subtitle(self, subtitle: EmbeddedSubtitle):
try:
path = self._get_subtitle_path(subtitle)
- except KeyError: # TODO: add MustGetBlacklisted support
+ except KeyError: # TODO: add MustGetBlacklisted support
logger.error("Couldn't get subtitle path")
return None
@@ -229,6 +233,7 @@ class EmbeddedSubtitlesProvider(Provider):
timeout=self._timeout,
fallback_to_convert=True,
basename_callback=_basename_callback,
+ progress_callback=lambda d: logger.debug("Progress: %s", d),
)
# Add the extracted paths to the containter path key
self._cached_paths[container.path] = extracted