From 9055b6ea8176010b6443cee34e155dec7038ab8e Mon Sep 17 00:00:00 2001 From: Chris Griffith Date: Thu, 18 Jul 2024 23:17:58 -0500 Subject: [PATCH] * Fixing #579 Missing Infos and no Mouse-Over info in Subs-Panel since 5.7 (thanks to GeZorTenPlotZ) --- CHANGES | 3 ++- fastflix/models/encode.py | 1 + fastflix/widgets/panels/subtitle_panel.py | 7 +++++-- 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/CHANGES b/CHANGES index a1ea9e72..77195c9e 100644 --- a/CHANGES +++ b/CHANGES @@ -2,7 +2,8 @@ ## Version 5.7.4 -* Fixing $578 Missing code signing to FastFlix exec inside of the installer (thanks to Sam Katakouzinos) +* Fixing #579 Missing Infos and no Mouse-Over info in Subs-Panel since 5.7 (thanks to GeZorTenPlotZ) +* Fixing #578 Missing code signing to FastFlix exec inside of the installer (thanks to Sam Katakouzinos) * Fixing #580 No Downmix key error on profile save (thanks to Hankuu) * Fixing #581 Fastflix could not recognize hevc video containing hdr10plus metadata with recent ffmpeg build (thanks to alpha-0) diff --git a/fastflix/models/encode.py b/fastflix/models/encode.py index 4714e572..095e0ecb 100644 --- a/fastflix/models/encode.py +++ b/fastflix/models/encode.py @@ -36,6 +36,7 @@ class SubtitleTrack(BaseModel): dispositions: dict = Field(default_factory=dict) enabled: bool = True long_name: str = "" + raw_info: Optional[Union[dict, Box]] = None class AttachmentTrack(BaseModel): diff --git a/fastflix/widgets/panels/subtitle_panel.py b/fastflix/widgets/panels/subtitle_panel.py index 0327a9b1..e0e0f8c8 100644 --- a/fastflix/widgets/panels/subtitle_panel.py +++ b/fastflix/widgets/panels/subtitle_panel.py @@ -100,7 +100,7 @@ def __init__(self, app, parent, index, enabled=True, first=False): # self.widgets.disposition.setCurrentIndex(dispositions.index("forced")) self.setFixedHeight(60) - # self.widgets.title.setToolTip(self.subtitle.to_yaml()) + self.widgets.title.setToolTip(sub_track.raw_info.to_yaml()) self.widgets.burn_in.setToolTip( f"""{t("Overlay this subtitle track onto the video during conversion.")}\n {t("Please make sure seek method is set to exact")}.\n @@ -308,6 +308,7 @@ def new_source(self): audio_end = len(self.app.fastflix.current_video.audio_tracks) for index, track in enumerate(self.app.fastflix.current_video.streams.subtitle): enabled = self.lang_match(track) + subtitle_type = subtitle_types.get(track.get("codec_name", "text"), "text") self.app.fastflix.current_video.subtitle_tracks.append( SubtitleTrack( index=track.index, @@ -315,8 +316,10 @@ def new_source(self): dispositions={k: bool(v) for k, v in track.disposition.items()}, burn_in=False, language=track.get("tags", {}).get("language", ""), - subtitle_type=subtitle_types.get(track.get("codec_name", "text"), "text"), + subtitle_type=subtitle_type, enabled=enabled, + long_name=track.get("codec_long_name", f"{t('Subtitle Type')}:{subtitle_type}"), + raw_info=track, ) )