From 24d959569cc2d94af1f140e4d29231091c2f4306 Mon Sep 17 00:00:00 2001 From: Nikolaj Olsson Date: Mon, 26 Aug 2024 21:04:32 +0200 Subject: [PATCH] Handle dvb_sub in mkv in "Batch convert" - thx Gerben :) --- src/ui/Forms/BatchConvert.cs | 8 +++++--- src/ui/Logic/CommandLineConvert/CommandLineConverter.cs | 2 +- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/src/ui/Forms/BatchConvert.cs b/src/ui/Forms/BatchConvert.cs index 05ad1591c..3b211dffb 100644 --- a/src/ui/Forms/BatchConvert.cs +++ b/src/ui/Forms/BatchConvert.cs @@ -828,6 +828,7 @@ namespace Nikse.SubtitleEdit.Forms var mkvVobSub = new List(); var mkvSrt = new List(); var mkvSsa = new List(); + var mkvDvbSub = new List(); var mkvAss = new List(); var mkvTextST = new List(); var mkvCount = 0; @@ -916,7 +917,7 @@ namespace Nikse.SubtitleEdit.Forms } else if (track.CodecId.Equals("S_DVBSUB", StringComparison.OrdinalIgnoreCase)) { - mkvAss.Add(MakeMkvTrackInfoString(track)); + mkvDvbSub.Add(MakeMkvTrackInfoString(track)); } else if (track.CodecId.Equals("S_HDMV/TEXTST", StringComparison.OrdinalIgnoreCase)) { @@ -926,7 +927,7 @@ namespace Nikse.SubtitleEdit.Forms } } - if (mkvVobSub.Count + mkvPgs.Count + mkvSrt.Count + mkvSsa.Count + mkvAss.Count + mkvTextST.Count <= 0) + if (mkvVobSub.Count + mkvPgs.Count + mkvSrt.Count + mkvSsa.Count + mkvAss.Count + mkvDvbSub.Count + mkvTextST.Count <= 0) { item.SubItems.Add(LanguageSettings.Current.UnknownSubtitle.Title); } @@ -986,6 +987,7 @@ namespace Nikse.SubtitleEdit.Forms { "SSA", mkvSsa }, { "ASS", mkvAss }, { "TextST", mkvTextST }, + { "DvdSub", mkvDvbSub }, }; foreach (var mkvSubFormat in mkvSubFormats) @@ -1528,7 +1530,7 @@ namespace Nikse.SubtitleEdit.Forms } else { - if (bluRaySubtitles.Count > 0) + if (binaryParagraphs.Count > 0) { item.SubItems[3].Text = LanguageSettings.Current.BatchConvert.Ocr; using (var vobSubOcr = new VobSubOcr()) diff --git a/src/ui/Logic/CommandLineConvert/CommandLineConverter.cs b/src/ui/Logic/CommandLineConvert/CommandLineConverter.cs index 3aade0757..a0b58c6b0 100644 --- a/src/ui/Logic/CommandLineConvert/CommandLineConverter.cs +++ b/src/ui/Logic/CommandLineConvert/CommandLineConverter.cs @@ -1757,7 +1757,7 @@ namespace Nikse.SubtitleEdit.Logic.CommandLineConvert var isImageBased = IsImageBased(format); List bin = null; - if (bin != null) + if (binaryParagraphs != null) { bin = binaryParagraphs.Cast().ToList(); }