/// </summary>\r
public LibEncode()\r
{\r
- HandBrakeUtils.MessageLogged += this.HandBrakeInstanceMessageLogged;\r
- HandBrakeUtils.ErrorLogged += this.HandBrakeInstanceErrorLogged;\r
}\r
\r
/// <summary>\r
\r
// Create a new HandBrake instance\r
// Setup the HandBrake Instance\r
+ HandBrakeUtils.MessageLogged += this.HandBrakeInstanceMessageLogged;\r
+ HandBrakeUtils.ErrorLogged += this.HandBrakeInstanceErrorLogged;\r
this.instance = HandBrakeInstanceManager.GetEncodeInstance(job.Configuration.Verbosity);\r
this.instance.EncodeCompleted += this.InstanceEncodeCompleted;\r
this.instance.EncodeProgress += this.InstanceEncodeProgress;\r
? new EventArgs.EncodeCompletedEventArgs(false, null, string.Empty, this.currentTask.Task.Destination)\r
: new EventArgs.EncodeCompletedEventArgs(true, null, string.Empty, this.currentTask.Task.Destination));\r
\r
+ HandBrakeUtils.MessageLogged -= this.HandBrakeInstanceMessageLogged;\r
+ HandBrakeUtils.ErrorLogged -= this.HandBrakeInstanceErrorLogged;\r
+\r
this.ShutdownFileWriter();\r
}\r
#endregion\r
public LibScan()\r
{\r
this.logging = new StringBuilder();\r
-\r
this.header = GeneralUtilities.CreateCliLogHeader();\r
-\r
- try\r
- {\r
- HandBrakeUtils.MessageLogged += this.HandBrakeInstanceMessageLogged;\r
- HandBrakeUtils.ErrorLogged += this.HandBrakeInstanceErrorLogged;\r
- }\r
- catch (Exception)\r
- {\r
- // Do nothing. \r
- }\r
}\r
\r
#region Events\r
this.scanLog = new StreamWriter(this.dvdInfoPath);\r
\r
// Create a new HandBrake Instance.\r
+ HandBrakeUtils.MessageLogged += this.HandBrakeInstanceMessageLogged;\r
+ HandBrakeUtils.ErrorLogged += this.HandBrakeInstanceErrorLogged;\r
this.instance = HandBrakeInstanceManager.GetScanInstance(configuraiton.Verbosity);\r
this.instance.ScanProgress += this.InstanceScanProgress;\r
this.instance.ScanCompleted += this.InstanceScanCompleted;\r
// Do Nothing.\r
}\r
\r
+ HandBrakeUtils.MessageLogged -= this.HandBrakeInstanceMessageLogged;\r
+ HandBrakeUtils.ErrorLogged -= this.HandBrakeInstanceErrorLogged;\r
+\r
// TODO -> Might be a better place to fix this.\r
string path = this.currentSourceScanPath;\r
if (this.currentSourceScanPath.Contains("\""))\r