diff options
author | sr55 <[email protected]> | 2015-01-24 16:27:24 +0000 |
---|---|---|
committer | sr55 <[email protected]> | 2015-01-24 16:27:24 +0000 |
commit | ffc93adeaa23923c1c8b401e45cf4b155e4e99eb (patch) | |
tree | 0b6e6c014b6486048bbad453884b1978fd77ed0c /win/CS/HandBrake.ApplicationServices/Services/Scan | |
parent | 2739ba3806abcb12157a689d4c2eb258992bcb39 (diff) |
WinGui: Handle the Logging events a bit better. This will stop some of the cross scan/encode log pollution that's been occurring since libhb encode was enabled. Will need to look into a better solution as scans during an encode will still appear in the encode log and vice versa while a scan is ongoing.
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@6809 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'win/CS/HandBrake.ApplicationServices/Services/Scan')
-rw-r--r-- | win/CS/HandBrake.ApplicationServices/Services/Scan/LibScan.cs | 16 |
1 files changed, 5 insertions, 11 deletions
diff --git a/win/CS/HandBrake.ApplicationServices/Services/Scan/LibScan.cs b/win/CS/HandBrake.ApplicationServices/Services/Scan/LibScan.cs index 796ef5db5..721959a90 100644 --- a/win/CS/HandBrake.ApplicationServices/Services/Scan/LibScan.cs +++ b/win/CS/HandBrake.ApplicationServices/Services/Scan/LibScan.cs @@ -101,18 +101,7 @@ namespace HandBrake.ApplicationServices.Services.Scan public LibScan()
{
this.logging = new StringBuilder();
-
this.header = GeneralUtilities.CreateCliLogHeader();
-
- try
- {
- HandBrakeUtils.MessageLogged += this.HandBrakeInstanceMessageLogged;
- HandBrakeUtils.ErrorLogged += this.HandBrakeInstanceErrorLogged;
- }
- catch (Exception)
- {
- // Do nothing.
- }
}
#region Events
@@ -226,6 +215,8 @@ namespace HandBrake.ApplicationServices.Services.Scan this.scanLog = new StreamWriter(this.dvdInfoPath);
// Create a new HandBrake Instance.
+ HandBrakeUtils.MessageLogged += this.HandBrakeInstanceMessageLogged;
+ HandBrakeUtils.ErrorLogged += this.HandBrakeInstanceErrorLogged;
this.instance = HandBrakeInstanceManager.GetScanInstance(configuraiton.Verbosity);
this.instance.ScanProgress += this.InstanceScanProgress;
this.instance.ScanCompleted += this.InstanceScanCompleted;
@@ -374,6 +365,9 @@ namespace HandBrake.ApplicationServices.Services.Scan // Do Nothing.
}
+ HandBrakeUtils.MessageLogged -= this.HandBrakeInstanceMessageLogged;
+ HandBrakeUtils.ErrorLogged -= this.HandBrakeInstanceErrorLogged;
+
// TODO -> Might be a better place to fix this.
string path = this.currentSourceScanPath;
if (this.currentSourceScanPath.Contains("\""))
|