Auto-load audio files - thx Leon :)

This commit is contained in:
niksedk 2021-11-11 10:24:52 +01:00
parent 021705df24
commit 6d1949a846
2 changed files with 15 additions and 1 deletions

View File

@ -48,6 +48,7 @@
* Update Tesseract 5 alpha 2021-08-11 to RC1 2021-10-30
* Prefer FFmpeg over VLC for extracting audio - thx Jamakmake
* Include favorite formats in "reset"
* Auto-load audio files - thx Leon
* FIXED:
* Fix tag style converting from/to ASSA - thx von Suppé
* Fix "Title bar text" when translating - thx Andrebavila

View File

@ -20735,6 +20735,19 @@ namespace Nikse.SubtitleEdit.Forms
}
}
if (movieFileName == null)
{
foreach (var extension in Utilities.AudioFileExtensions)
{
var fileName = fileNameNoExtension + extension;
if (File.Exists(fileName))
{
movieFileName = fileName;
break;
}
}
}
if (movieFileName != null)
{
OpenVideo(movieFileName);
@ -31756,7 +31769,7 @@ namespace Nikse.SubtitleEdit.Forms
}
RestoreSubtitleListviewIndices();
SetTitle();
SetEncoding(Encoding.UTF8);
if (!isOriginalVisible)