From 83af0dca6f4ecc16d5a4dcc6b6ccd97b707f7156 Mon Sep 17 00:00:00 2001 From: sr55 Date: Tue, 25 Sep 2012 15:23:17 +0000 Subject: WinGui: LibHb Encode and Scan support (off by default for the moment until I have time to test this and tidy up some of the code) Can be turned on in preferences. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4980 b64f7644-9d1e-0410-96f1-a4d463321fa5 --- .../Services/LibScan.cs | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) (limited to 'win/CS/HandBrake.ApplicationServices/Services/LibScan.cs') diff --git a/win/CS/HandBrake.ApplicationServices/Services/LibScan.cs b/win/CS/HandBrake.ApplicationServices/Services/LibScan.cs index 73f5fca57..c3598d922 100644 --- a/win/CS/HandBrake.ApplicationServices/Services/LibScan.cs +++ b/win/CS/HandBrake.ApplicationServices/Services/LibScan.cs @@ -183,6 +183,14 @@ namespace HandBrake.ApplicationServices.Services throw new NotImplementedException("Only Available when using the CLI mode. Not LibHB"); } + /// + /// Shutdown the service. + /// + public void Shutdown() + { + // Nothing to do for this implementation. + } + #endregion #region Private Methods @@ -205,7 +213,8 @@ namespace HandBrake.ApplicationServices.Services { this.logging.Clear(); - string source = sourcePath.ToString().EndsWith("\\") ? sourcePath.ToString() : "\"" + sourcePath + "\""; + string source = sourcePath.ToString().EndsWith("\\") ? string.Format("\"{0}\\\\\"", sourcePath.ToString().TrimEnd('\\')) + : "\"" + sourcePath + "\""; currentSourceScanPath = source; IsScanning = true; @@ -240,7 +249,14 @@ namespace HandBrake.ApplicationServices.Services /// private void InstanceScanCompleted(object sender, EventArgs e) { - this.SouceData = new Source { Titles = ConvertTitles(this.instance.Titles), ScanPath = currentSourceScanPath}; + // TODO -> Might be a better place to fix this. + string path = currentSourceScanPath; + if (currentSourceScanPath.Contains("\"")) + { + path = currentSourceScanPath.Trim('\"'); + } + + this.SouceData = new Source { Titles = ConvertTitles(this.instance.Titles), ScanPath = path }; IsScanning = false; -- cgit v1.2.3