]> granicus.if.org Git - handbrake/commitdiff
WinGui: Fix an issue with long chapters causing scans to fail to complete. Fixes...
authorsr55 <sr55.hb@outlook.com>
Tue, 2 May 2017 19:37:20 +0000 (20:37 +0100)
committersr55 <sr55.hb@outlook.com>
Tue, 2 May 2017 19:37:20 +0000 (20:37 +0100)
win/CS/HandBrake.ApplicationServices/Interop/HandBrakeInstance.cs
win/CS/HandBrake.ApplicationServices/Interop/Json/Scan/Duration.cs

index 2c56a76c44fa4d596ff43d1a2751ebbb361a5936..854dc4cbea374fe50391e6a94ed12d1fe2a03a21 100644 (file)
@@ -14,6 +14,7 @@ namespace HandBrake.ApplicationServices.Interop
     using System.Diagnostics;\r
     using System.Drawing;\r
     using System.Drawing.Imaging;\r
+    using System.IO;\r
     using System.Linq;\r
     using System.Runtime.ExceptionServices;\r
     using System.Runtime.InteropServices;\r
@@ -240,6 +241,7 @@ namespace HandBrake.ApplicationServices.Interop
                 catch (Exception exc)\r
                 {\r
                     Debug.WriteLine(exc);\r
+                    this.log.LogMessage(exc.ToString(), LogMessageType.API, LogLevel.Error);\r
                 }\r
             };\r
             this.scanPollTimer.Start();\r
@@ -504,12 +506,11 @@ namespace HandBrake.ApplicationServices.Interop
             }\r
             else if (state != null && state.State == NativeConstants.HB_STATE_SCANDONE)\r
             {\r
-                this.log.LogMessage("Scan: HB_STATE_SCANDONE", LogMessageType.API, LogLevel.Info);\r
                 this.scanPollTimer.Stop();\r
 \r
                 var jsonMsg = HBFunctions.hb_get_title_set_json(this.hbHandle);\r
                 string scanJson = InteropUtilities.ToStringFromUtf8Ptr(jsonMsg);\r
-                this.log.LogMessage(scanJson, LogMessageType.Progress, LogLevel.Info);\r
+                this.log.LogMessage(scanJson, LogMessageType.Progress, LogLevel.Trace);\r
 \r
                 if (string.IsNullOrEmpty(scanJson))\r
                 {\r
index 4eea32e1282756c842cb8d8a46598061cabbea73..6ae496901d998a7dd6ae1b8e049431014abc4370 100644 (file)
@@ -32,6 +32,6 @@ namespace HandBrake.ApplicationServices.Interop.Json.Scan
         /// <summary>\r
         /// Gets or sets the ticks.\r
         /// </summary>\r
-        public int Ticks { get; set; }\r
+        public long Ticks { get; set; }\r
     }\r
 }
\ No newline at end of file