diff options
author | sr55 <[email protected]> | 2011-01-03 20:15:10 +0000 |
---|---|---|
committer | sr55 <[email protected]> | 2011-01-03 20:15:10 +0000 |
commit | ee94883ba1b2e3d0dc432c84a2c05db5812fe1c6 (patch) | |
tree | a279256432b524c06048a8b7e4aa6b90e913c3c0 /win/C#/HandBrake.ApplicationServices | |
parent | b1ab0c5b00eef003cb737414e77e4f12ad25b854 (diff) |
WinGui:
- Second attempt at fixing file path problems.
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@3736 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'win/C#/HandBrake.ApplicationServices')
-rw-r--r-- | win/C#/HandBrake.ApplicationServices/Model/Job.cs | 17 | ||||
-rw-r--r-- | win/C#/HandBrake.ApplicationServices/Services/Scan.cs | 16 |
2 files changed, 11 insertions, 22 deletions
diff --git a/win/C#/HandBrake.ApplicationServices/Model/Job.cs b/win/C#/HandBrake.ApplicationServices/Model/Job.cs index a18a6117c..536069153 100644 --- a/win/C#/HandBrake.ApplicationServices/Model/Job.cs +++ b/win/C#/HandBrake.ApplicationServices/Model/Job.cs @@ -11,11 +11,6 @@ namespace HandBrake.ApplicationServices.Model public class Job
{
/// <summary>
- /// the CLI Query.
- /// </summary>
- private string query;
-
- /// <summary>
/// Gets or sets the job ID.
/// </summary>
public int Id { get; set; }
@@ -28,17 +23,7 @@ namespace HandBrake.ApplicationServices.Model /// <summary>
/// Gets or sets the query string.
/// </summary>
- public string Query
- {
- get
- {
- return this.query.Replace("\\\"", "\"").Replace("\\\\", "\\");
- }
- set
- {
- this.query = value;
- }
- }
+ public string Query { get; set; }
/// <summary>
/// Gets or sets a value indicating whether if this is a user or GUI generated query
diff --git a/win/C#/HandBrake.ApplicationServices/Services/Scan.cs b/win/C#/HandBrake.ApplicationServices/Services/Scan.cs index 2a5188ab6..7bc74bc5c 100644 --- a/win/C#/HandBrake.ApplicationServices/Services/Scan.cs +++ b/win/C#/HandBrake.ApplicationServices/Services/Scan.cs @@ -110,7 +110,7 @@ namespace HandBrake.ApplicationServices.Services if (logBuffer == null)
{
ResetLogReader(false);
- ReadLastScanFile();
+ ReadLastScanFile();
}
return logBuffer != null ? logBuffer.ToString() : string.Empty;
@@ -146,7 +146,7 @@ namespace HandBrake.ApplicationServices.Services catch (Exception ex)
{
errorService.ShowError("Unable to kill HandBrakeCLI.exe \n" +
- "You may need to manually kill HandBrakeCLI.exe using the Windows Task Manager if it does not close automatically" +
+ "You may need to manually kill HandBrakeCLI.exe using the Windows Task Manager if it does not close automatically" +
" within the next few minutes. ", ex.ToString());
}
}
@@ -186,12 +186,16 @@ namespace HandBrake.ApplicationServices.Services // Quick fix for "F:\\" style paths. Just get rid of the \\ so the CLI doesn't fall over.
// Sould probably clean up the escaping of the strings later.
+ string source;
if (sourcePath.ToString().EndsWith("\\"))
{
- sourcePath = sourcePath.ToString().Replace("\\", string.Empty);
+ source = sourcePath.ToString();
+ }
+ else
+ {
+ source = "\"" + sourcePath + "\"";
}
- string source = "\"" + sourcePath + "\"";
string command = String.Format(@" -i {0} -t{1} {2} -v ", source, title, extraArguments);
this.hbProc = new Process
@@ -237,7 +241,7 @@ namespace HandBrake.ApplicationServices.Services IsScanning = false;
if (this.ScanCompleted != null)
- this.ScanCompleted(this, new EventArgs());
+ this.ScanCompleted(this, new EventArgs());
}
catch (Exception exc)
{
@@ -246,7 +250,7 @@ namespace HandBrake.ApplicationServices.Services errorService.ShowError("An error has occured during the scan process.", exc.ToString());
if (this.ScanCompleted != null)
- this.ScanCompleted(this, new EventArgs());
+ this.ScanCompleted(this, new EventArgs());
}
}
|