Fixed message when user cancels transcription operation

This commit is contained in:
Thorsten Sommer 2026-07-14 19:09:49 +02:00
parent abffc4aed3
commit c159875351
Signed by untrusted user who does not match committer: tsommer
GPG Key ID: 371BBA77A02C0108
2 changed files with 5 additions and 0 deletions

View File

@ -1089,6 +1089,10 @@ public abstract class BaseProvider : IProvider, ISecretId
return TranscriptionResult.FromText(transcriptionResponse.Text);
}
catch (OperationCanceledException) when (token.IsCancellationRequested)
{
throw;
}
catch (Exception e)
{
if (this.IsTimeoutException(e, token))

View File

@ -447,6 +447,7 @@ public sealed class MediaTranscriptionService(RustService rustService, SettingsM
providerSettings.Model);
var providerResult = await provider.TranscribeAudioAsync(providerSettings.Model, normalized.Result.OutputPath, settingsManager, operation.Cancellation.Token);
operation.Cancellation.Token.ThrowIfCancellationRequested();
if (!providerResult.Success)
{
logger.LogWarning("The transcription provider failed for '{MediaPath}': {Diagnostic}", mediaPath, providerResult.ErrorMessage);