if (title > 0)\r
extraArguments += " --scan ";\r
\r
+ // Quick fix for "F:\\" style paths. Just get rid of the \\ so the CLI doesn't fall over.\r
+ // Sould probably clean up the escaping of the strings later.\r
+ if (sourcePath.ToString().EndsWith("\\"))\r
+ {\r
+ sourcePath = sourcePath.ToString().Replace("\\", string.Empty);\r
+ }\r
+\r
+ string source = "\"" + sourcePath + "\"";\r
+ string command = String.Format(@" -i {0} -t{1} {2} -v ", source, title, extraArguments);\r
+\r
this.hbProc = new Process\r
{\r
StartInfo =\r
{\r
FileName = handbrakeCLIPath,\r
- Arguments =\r
- String.Format(@" -i ""{0}"" -t{1} {2} -v ", sourcePath, title,\r
- extraArguments),\r
+ Arguments = command,\r
RedirectStandardOutput = true,\r
RedirectStandardError = true,\r
UseShellExecute = false,\r
if (this.readData.Buffer.Length < 100000000)\r
{\r
scanLog.WriteLine(Logging.CreateCliLogHeader(null));\r
+ scanLog.WriteLine("Query: " + command);\r
scanLog.Write(this.readData.Buffer);\r
+\r
+ logBuffer.AppendLine("Query: " + command);\r
logBuffer.AppendLine(this.readData.Buffer.ToString());\r
}\r
else\r