diff options
Diffstat (limited to 'win/CS/HandBrake.ApplicationServices/Interop/HandBrakeInstance.cs')
-rw-r--r-- | win/CS/HandBrake.ApplicationServices/Interop/HandBrakeInstance.cs | 16 |
1 files changed, 3 insertions, 13 deletions
diff --git a/win/CS/HandBrake.ApplicationServices/Interop/HandBrakeInstance.cs b/win/CS/HandBrake.ApplicationServices/Interop/HandBrakeInstance.cs index d8f432fc4..f94c6fe24 100644 --- a/win/CS/HandBrake.ApplicationServices/Interop/HandBrakeInstance.cs +++ b/win/CS/HandBrake.ApplicationServices/Interop/HandBrakeInstance.cs @@ -48,8 +48,6 @@ namespace HandBrake.ApplicationServices.Interop /// </summary>
private const double EncodePollIntervalMs = 250;
- private readonly ILog log = LogService.GetLogger();
-
/// <summary>
/// The native handle to the HandBrake instance.
/// </summary>
@@ -246,7 +244,7 @@ namespace HandBrake.ApplicationServices.Interop catch (Exception exc)
{
Debug.WriteLine(exc);
- this.log.LogMessage(exc.ToString(), LogMessageType.API, LogLevel.Error);
+ HandBrakeUtils.SendErrorEvent(exc.ToString());
}
};
this.scanPollTimer.Start();
@@ -480,7 +478,6 @@ namespace HandBrake.ApplicationServices.Interop {
IntPtr json = HBFunctions.hb_get_state_json(this.hbHandle);
string statusJson = Marshal.PtrToStringAnsi(json);
- this.log.LogMessage(statusJson, LogMessageType.Progress, LogLevel.Trace);
JsonState state = null;
if (!string.IsNullOrEmpty(statusJson))
{
@@ -502,14 +499,9 @@ namespace HandBrake.ApplicationServices.Interop var jsonMsg = HBFunctions.hb_get_title_set_json(this.hbHandle);
this.titlesJson = InteropUtilities.ToStringFromUtf8Ptr(jsonMsg);
- this.log.LogMessage(this.titlesJson, LogMessageType.Progress, LogLevel.Trace);
- if (string.IsNullOrEmpty(this.titlesJson))
- {
- this.log.LogMessage("Scan Error: No Scan Data Returned.", LogMessageType.API, LogLevel.Error);
- }
- else
- {
+ if (!string.IsNullOrEmpty(this.titlesJson))
+ {
this.titles = JsonConvert.DeserializeObject<JsonScanObject>(this.titlesJson);
if (this.titles != null)
{
@@ -533,8 +525,6 @@ namespace HandBrake.ApplicationServices.Interop IntPtr json = HBFunctions.hb_get_state_json(this.hbHandle);
string statusJson = Marshal.PtrToStringAnsi(json);
- this.log.LogMessage(statusJson, LogMessageType.Progress, LogLevel.Trace);
-
JsonState state = JsonConvert.DeserializeObject<JsonState>(statusJson);
TaskState taskState = state != null ? TaskState.FromRepositoryValue(state.State) : null;
|