Skip to content

Commit

Permalink
Additional validation for audio format
Browse files Browse the repository at this point in the history
  • Loading branch information
codeconscious committed Aug 20, 2024
1 parent 4a95957 commit 637217d
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/CCVTAC.Console/Orchestrator.cs
Original file line number Diff line number Diff line change
Expand Up @@ -250,6 +250,12 @@ static string SummarizeUpdate(string settingName, string setting)
if (command.StartsWith(Commands.UpdateAudioFormatPrefix, StringComparison.InvariantCultureIgnoreCase))
{
var format = command.Replace(Commands.UpdateAudioFormatPrefix, string.Empty).ToLowerInvariant();

if (format == string.Empty)
{
return Result.Fail($"You must append a supported audio format (e.g., \"best\" or \"m4a\").");
}

var updateResult = SettingsAdapter.UpdateAudioFormat(settings, format);
if (updateResult.IsError)
{
Expand Down

0 comments on commit 637217d

Please sign in to comment.