diff options
author | Vitiko <[email protected]> | 2022-05-04 23:04:32 -0400 |
---|---|---|
committer | Vitiko <[email protected]> | 2022-05-05 00:04:37 -0400 |
commit | e186bd1a0f754738873eec995271522dc1df2263 (patch) | |
tree | d75aa80a8f0a557782741b02853f7b88db3e5679 /libs | |
parent | 0427c83cdade5622e176ba81d16f6a7eaad2309b (diff) | |
download | bazarr-e186bd1a0f754738873eec995271522dc1df2263.tar.gz bazarr-e186bd1a0f754738873eec995271522dc1df2263.zip |
no log: update embedded subtitles provider release info representation
Diffstat (limited to 'libs')
-rw-r--r-- | libs/subliminal_patch/providers/embeddedsubtitles.py | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/libs/subliminal_patch/providers/embeddedsubtitles.py b/libs/subliminal_patch/providers/embeddedsubtitles.py index aca0bb31b..324438a1c 100644 --- a/libs/subliminal_patch/providers/embeddedsubtitles.py +++ b/libs/subliminal_patch/providers/embeddedsubtitles.py @@ -40,7 +40,7 @@ class EmbeddedSubtitle(Subtitle): self.container: FFprobeVideoContainer = container self.forced = stream.disposition.forced self.page_link = self.container.path - self.release_info = os.path.basename(self.page_link) + self.release_info = _get_pretty_release_name(stream, container) self.media_type = media_type self._matches: set = matches @@ -272,3 +272,8 @@ def _is_fuse_rclone_mount(path: str): # https://forum.rclone.org/t/fuse-inode-number-aufs/215/5 # https://pkg.go.dev/bazil.org/fuse/fs?utm_source=godoc#GenerateDynamicInode return len(str(os.stat(path).st_ino)) > 18 + + +def _get_pretty_release_name(stream, container): + bname = os.path.basename(container.path) + return f"{os.path.splitext(bname)[0]}.{stream.suffix}" |