mirror of
https://github.com/SubtitleEdit/subtitleedit.git
synced 2024-11-22 03:02:35 +01:00
Merge branch 'main' of https://github.com/SubtitleEdit/subtitleedit
This commit is contained in:
commit
c9ba8b7873
@ -452,6 +452,11 @@ namespace Nikse.SubtitleEdit.Forms
|
|||||||
var failCount = 0;
|
var failCount = 0;
|
||||||
for (var index = 0; index < _batchVideoAndSubList.Count; index++)
|
for (var index = 0; index < _batchVideoAndSubList.Count; index++)
|
||||||
{
|
{
|
||||||
|
if (_abort)
|
||||||
|
{
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
labelPleaseWait.Text = $"{index + 1}/{_batchVideoAndSubList.Count} - {LanguageSettings.Current.General.PleaseWait}";
|
labelPleaseWait.Text = $"{index + 1}/{_batchVideoAndSubList.Count} - {LanguageSettings.Current.General.PleaseWait}";
|
||||||
var videoAndSub = _batchVideoAndSubList[index];
|
var videoAndSub = _batchVideoAndSubList[index];
|
||||||
_videoInfo = UiUtil.GetVideoInfo(videoAndSub.VideoFileName);
|
_videoInfo = UiUtil.GetVideoInfo(videoAndSub.VideoFileName);
|
||||||
@ -520,6 +525,18 @@ namespace Nikse.SubtitleEdit.Forms
|
|||||||
// ignore
|
// ignore
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (_abort && File.Exists(VideoFileName) && new FileInfo(VideoFileName).Length < 2_000)
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
File.Delete(VideoFileName);
|
||||||
|
}
|
||||||
|
catch
|
||||||
|
{
|
||||||
|
// ignore
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
sbInfo.AppendLine();
|
sbInfo.AppendLine();
|
||||||
@ -2149,7 +2166,7 @@ namespace Nikse.SubtitleEdit.Forms
|
|||||||
var vInfo = new VideoInfo { Success = false };
|
var vInfo = new VideoInfo { Success = false };
|
||||||
if (fileName.EndsWith(".mp4", StringComparison.OrdinalIgnoreCase))
|
if (fileName.EndsWith(".mp4", StringComparison.OrdinalIgnoreCase))
|
||||||
{
|
{
|
||||||
vInfo = QuartsPlayer.GetVideoInfo(fileName);
|
vInfo = QuartsPlayer.GetVideoInfo(fileName);
|
||||||
if (!vInfo.Success)
|
if (!vInfo.Success)
|
||||||
{
|
{
|
||||||
vInfo = LibMpvDynamic.GetVideoInfo(fileName);
|
vInfo = LibMpvDynamic.GetVideoInfo(fileName);
|
||||||
|
Loading…
Reference in New Issue
Block a user