summaryrefslogtreecommitdiffstats
path: root/win/CS/HandBrakeWPF/Services
diff options
context:
space:
mode:
authorsr55 <[email protected]>2019-06-06 19:55:02 +0100
committersr55 <[email protected]>2019-06-06 19:55:02 +0100
commitb0fce31fb6da40a98ef9af26845f67d81819f5b4 (patch)
tree9c7092ba897f205121fe41ff45cf9908e4344b0e /win/CS/HandBrakeWPF/Services
parent0835cd60e3ecba9cad213109c80d64c42448367d (diff)
WinGui: Add a "Test" button to the When Done Audio options. Also log the "MediaFailed" event to the log otherwise we get silent failures. #2130
Diffstat (limited to 'win/CS/HandBrakeWPF/Services')
-rw-r--r--win/CS/HandBrakeWPF/Services/PrePostActionService.cs3
1 files changed, 2 insertions, 1 deletions
diff --git a/win/CS/HandBrakeWPF/Services/PrePostActionService.cs b/win/CS/HandBrakeWPF/Services/PrePostActionService.cs
index b2ab93c22..7d3233fc7 100644
--- a/win/CS/HandBrakeWPF/Services/PrePostActionService.cs
+++ b/win/CS/HandBrakeWPF/Services/PrePostActionService.cs
@@ -228,6 +228,7 @@ namespace HandBrakeWPF.Services
this.ServiceLogMessage("Playing Sound: " + filePath);
var uri = new Uri(filePath, UriKind.RelativeOrAbsolute);
var player = new MediaPlayer();
+ player.MediaFailed += (object sender, ExceptionEventArgs e) => { this.ServiceLogMessage(e?.ToString()); };
player.Open(uri);
player.Play();
}
@@ -237,7 +238,7 @@ namespace HandBrakeWPF.Services
}
}
- protected void ServiceLogMessage(string message)
+ private void ServiceLogMessage(string message)
{
this.log.LogMessage(string.Format("# {1}{0}", Environment.NewLine, message), LogMessageType.ScanOrEncode, LogLevel.Info);
}