Handle dvb_sub in mkv in "Batch convert" - thx Gerben :)

This commit is contained in:
Nikolaj Olsson 2024-08-26 21:04:32 +02:00
parent 511192a2fc
commit 24d959569c
2 changed files with 6 additions and 4 deletions

View File

@ -828,6 +828,7 @@ namespace Nikse.SubtitleEdit.Forms
var mkvVobSub = new List<string>(); var mkvVobSub = new List<string>();
var mkvSrt = new List<string>(); var mkvSrt = new List<string>();
var mkvSsa = new List<string>(); var mkvSsa = new List<string>();
var mkvDvbSub = new List<string>();
var mkvAss = new List<string>(); var mkvAss = new List<string>();
var mkvTextST = new List<string>(); var mkvTextST = new List<string>();
var mkvCount = 0; var mkvCount = 0;
@ -916,7 +917,7 @@ namespace Nikse.SubtitleEdit.Forms
} }
else if (track.CodecId.Equals("S_DVBSUB", StringComparison.OrdinalIgnoreCase)) 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)) 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); item.SubItems.Add(LanguageSettings.Current.UnknownSubtitle.Title);
} }
@ -986,6 +987,7 @@ namespace Nikse.SubtitleEdit.Forms
{ "SSA", mkvSsa }, { "SSA", mkvSsa },
{ "ASS", mkvAss }, { "ASS", mkvAss },
{ "TextST", mkvTextST }, { "TextST", mkvTextST },
{ "DvdSub", mkvDvbSub },
}; };
foreach (var mkvSubFormat in mkvSubFormats) foreach (var mkvSubFormat in mkvSubFormats)
@ -1528,7 +1530,7 @@ namespace Nikse.SubtitleEdit.Forms
} }
else else
{ {
if (bluRaySubtitles.Count > 0) if (binaryParagraphs.Count > 0)
{ {
item.SubItems[3].Text = LanguageSettings.Current.BatchConvert.Ocr; item.SubItems[3].Text = LanguageSettings.Current.BatchConvert.Ocr;
using (var vobSubOcr = new VobSubOcr()) using (var vobSubOcr = new VobSubOcr())

View File

@ -1757,7 +1757,7 @@ namespace Nikse.SubtitleEdit.Logic.CommandLineConvert
var isImageBased = IsImageBased(format); var isImageBased = IsImageBased(format);
List<IBinaryParagraph> bin = null; List<IBinaryParagraph> bin = null;
if (bin != null) if (binaryParagraphs != null)
{ {
bin = binaryParagraphs.Cast<IBinaryParagraph>().ToList(); bin = binaryParagraphs.Cast<IBinaryParagraph>().ToList();
} }