diff --git a/Changelog.txt b/Changelog.txt index 348a2200e..5350ebd47 100644 --- a/Changelog.txt +++ b/Changelog.txt @@ -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 diff --git a/src/ui/Forms/Main.cs b/src/ui/Forms/Main.cs index f47d50d7c..c794e9329 100644 --- a/src/ui/Forms/Main.cs +++ b/src/ui/Forms/Main.cs @@ -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)