From c7c125d40be26273ed601e23d1127d405348120f Mon Sep 17 00:00:00 2001 From: l4kr Date: Wed, 8 Jul 2026 10:37:56 +0200 Subject: [PATCH] Match and mux in dropped external subtitles MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Drag in subtitle files alongside .mkv files and they're matched to the right video by episode code (S04E06, zero-padding and separator insensitive, plus 4x06 as a fallback) and muxed in as extra subtitle tracks. Any subtitle format mkvmerge accepts is recognized: SRT, (S)SA, VobSub, WebVTT, PGS/SUP, USF, SAMI, TTML/DFXP, STL, Kate. Matching works regardless of drop order — subtitles dropped before their video are held pending until a matching video shows up, and vice versa. Language, forced, and SDH flags are guessed from common filename tokens (e.g. "eng", "forced", "sdh") to set the muxed track's language/name/flags; unmatched subtitles are reported in the status bar. --- Futonizer.csproj | 4 +- MainWindow.xaml | 66 +++++++++++- MainWindow.xaml.cs | 155 +++++++++++++++++++++++++++-- Models/ExternalSubtitleTrack.cs | 58 +++++++++++ Models/QueuedFileItem.cs | 28 +++++- Services/MkvService.cs | 47 ++++++++- Services/SubtitleLanguageHelper.cs | 105 +++++++++++++++++++ Services/SubtitleMatcher.cs | 61 ++++++++++++ Views/ProgressWindow.xaml.cs | 8 +- 9 files changed, 511 insertions(+), 21 deletions(-) create mode 100644 Models/ExternalSubtitleTrack.cs create mode 100644 Services/SubtitleLanguageHelper.cs create mode 100644 Services/SubtitleMatcher.cs diff --git a/Futonizer.csproj b/Futonizer.csproj index bd52497..6e13baa 100644 --- a/Futonizer.csproj +++ b/Futonizer.csproj @@ -9,8 +9,8 @@ enable Futonizer Futonizer - 1.0.5 - 1.0.5.0 + 1.0.6 + 1.0.6.0 Assets\app.ico diff --git a/MainWindow.xaml b/MainWindow.xaml index 3ba68d5..3a00537 100644 --- a/MainWindow.xaml +++ b/MainWindow.xaml @@ -137,7 +137,7 @@ @@ -158,6 +158,7 @@ + @@ -179,12 +180,21 @@ FontSize="12" VerticalAlignment="Center" Margin="6,0" TextTrimming="CharacterEllipsis"/> - + + + + -