From ec57a237454d198768b82985a7daa06d9c4abd17 Mon Sep 17 00:00:00 2001 From: sr55 Date: Tue, 2 May 2017 20:37:20 +0100 Subject: WinGui: Fix an issue with long chapters causing scans to fail to complete. Fixes #713 --- win/CS/HandBrake.ApplicationServices/Interop/HandBrakeInstance.cs | 5 +++-- win/CS/HandBrake.ApplicationServices/Interop/Json/Scan/Duration.cs | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/win/CS/HandBrake.ApplicationServices/Interop/HandBrakeInstance.cs b/win/CS/HandBrake.ApplicationServices/Interop/HandBrakeInstance.cs index 2c56a76c4..854dc4cbe 100644 --- a/win/CS/HandBrake.ApplicationServices/Interop/HandBrakeInstance.cs +++ b/win/CS/HandBrake.ApplicationServices/Interop/HandBrakeInstance.cs @@ -14,6 +14,7 @@ namespace HandBrake.ApplicationServices.Interop using System.Diagnostics; using System.Drawing; using System.Drawing.Imaging; + using System.IO; using System.Linq; using System.Runtime.ExceptionServices; using System.Runtime.InteropServices; @@ -240,6 +241,7 @@ namespace HandBrake.ApplicationServices.Interop catch (Exception exc) { Debug.WriteLine(exc); + this.log.LogMessage(exc.ToString(), LogMessageType.API, LogLevel.Error); } }; this.scanPollTimer.Start(); @@ -504,12 +506,11 @@ namespace HandBrake.ApplicationServices.Interop } else if (state != null && state.State == NativeConstants.HB_STATE_SCANDONE) { - this.log.LogMessage("Scan: HB_STATE_SCANDONE", LogMessageType.API, LogLevel.Info); this.scanPollTimer.Stop(); var jsonMsg = HBFunctions.hb_get_title_set_json(this.hbHandle); string scanJson = InteropUtilities.ToStringFromUtf8Ptr(jsonMsg); - this.log.LogMessage(scanJson, LogMessageType.Progress, LogLevel.Info); + this.log.LogMessage(scanJson, LogMessageType.Progress, LogLevel.Trace); if (string.IsNullOrEmpty(scanJson)) { diff --git a/win/CS/HandBrake.ApplicationServices/Interop/Json/Scan/Duration.cs b/win/CS/HandBrake.ApplicationServices/Interop/Json/Scan/Duration.cs index 4eea32e12..6ae496901 100644 --- a/win/CS/HandBrake.ApplicationServices/Interop/Json/Scan/Duration.cs +++ b/win/CS/HandBrake.ApplicationServices/Interop/Json/Scan/Duration.cs @@ -32,6 +32,6 @@ namespace HandBrake.ApplicationServices.Interop.Json.Scan /// /// Gets or sets the ticks. /// - public int Ticks { get; set; } + public long Ticks { get; set; } } } \ No newline at end of file -- cgit v1.2.3