mirror of
https://github.com/SubtitleEdit/subtitleedit.git
synced 2024-11-22 03:02:35 +01:00
Fix endless recursion - thx oep42 :)
This commit is contained in:
parent
fb53de04a7
commit
05a960f86e
@ -167,12 +167,12 @@ namespace Nikse.SubtitleEdit.Core.AudioToText
|
||||
var location = Configuration.Settings.Tools.WhisperCtranslate2Location;
|
||||
if (!string.IsNullOrEmpty(location))
|
||||
{
|
||||
if (location.EndsWith(GetExecutableFileName(whisperChoice), StringComparison.InvariantCultureIgnoreCase) && File.Exists(location))
|
||||
if (location.EndsWith(GetExecutableFileNameNoPath(whisperChoice), StringComparison.InvariantCultureIgnoreCase) && File.Exists(location))
|
||||
{
|
||||
return Path.GetDirectoryName(location);
|
||||
}
|
||||
|
||||
if (Directory.Exists(location) && File.Exists(Path.Combine(location, GetExecutableFileName(whisperChoice))))
|
||||
if (Directory.Exists(location) && File.Exists(Path.Combine(location, GetExecutableFileNameNoPath(whisperChoice))))
|
||||
{
|
||||
return location;
|
||||
}
|
||||
@ -347,6 +347,11 @@ namespace Nikse.SubtitleEdit.Core.AudioToText
|
||||
return "whisper";
|
||||
}
|
||||
|
||||
return GetExecutableFileNameNoPath(whisperChoice);
|
||||
}
|
||||
|
||||
private static string GetExecutableFileNameNoPath(string whisperChoice)
|
||||
{
|
||||
if (Configuration.IsRunningOnWindows)
|
||||
{
|
||||
if (whisperChoice == WhisperChoice.Cpp || Configuration.Settings.Tools.WhisperChoice == WhisperChoice.CppCuBlas)
|
||||
|
Loading…
Reference in New Issue
Block a user