Skip to content

Commit

Permalink
Embedded Subtitles Provider: handle KeyError for cached paths
Browse files Browse the repository at this point in the history
  • Loading branch information
vitiko98 committed Jan 28, 2024
1 parent deef13d commit cdf7296
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion libs/subliminal_patch/providers/embeddedsubtitles.py
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,11 @@ def list_subtitles(self, video, languages):

@blacklist_on(ExtractionError)
def download_subtitle(self, subtitle: EmbeddedSubtitle):
path = self._get_subtitle_path(subtitle)
try:
path = self._get_subtitle_path(subtitle)
except KeyError: # TODO: add MustGetBlacklisted support
logger.error("Couldn't get subtitle path")
return None

modifiers = _type_modifiers.get(subtitle.stream.codec_name) or set()
logger.debug("Found modifiers for %s type: %s", subtitle.stream, modifiers)
Expand Down

0 comments on commit cdf7296

Please sign in to comment.