summaryrefslogtreecommitdiffstats
path: root/win/CS/HandBrake.ApplicationServices
diff options
context:
space:
mode:
Diffstat (limited to 'win/CS/HandBrake.ApplicationServices')
-rw-r--r--win/CS/HandBrake.ApplicationServices/Properties/Settings.Designer.cs50
-rw-r--r--win/CS/HandBrake.ApplicationServices/Properties/Settings.settings12
-rw-r--r--win/CS/HandBrake.ApplicationServices/Services/QueueProcessor.cs17
-rw-r--r--win/CS/HandBrake.ApplicationServices/UserSettingConstants.cs15
-rw-r--r--win/CS/HandBrake.ApplicationServices/app.config12
5 files changed, 105 insertions, 1 deletions
diff --git a/win/CS/HandBrake.ApplicationServices/Properties/Settings.Designer.cs b/win/CS/HandBrake.ApplicationServices/Properties/Settings.Designer.cs
index 228bdbe14..f478b91cb 100644
--- a/win/CS/HandBrake.ApplicationServices/Properties/Settings.Designer.cs
+++ b/win/CS/HandBrake.ApplicationServices/Properties/Settings.Designer.cs
@@ -1,7 +1,7 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
-// Runtime Version:4.0.30319.1
+// Runtime Version:4.0.30319.225
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
@@ -226,5 +226,53 @@ namespace HandBrake.ApplicationServices.Properties {
this["HandBrakeExeHash"] = value;
}
}
+
+ [global::System.Configuration.UserScopedSettingAttribute()]
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ [global::System.Configuration.DefaultSettingValueAttribute("")]
+ public string Setting {
+ get {
+ return ((string)(this["Setting"]));
+ }
+ set {
+ this["Setting"] = value;
+ }
+ }
+
+ [global::System.Configuration.UserScopedSettingAttribute()]
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ [global::System.Configuration.DefaultSettingValueAttribute("")]
+ public string SendFileTo {
+ get {
+ return ((string)(this["SendFileTo"]));
+ }
+ set {
+ this["SendFileTo"] = value;
+ }
+ }
+
+ [global::System.Configuration.UserScopedSettingAttribute()]
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ [global::System.Configuration.DefaultSettingValueAttribute("")]
+ public string SendFileToArgs {
+ get {
+ return ((string)(this["SendFileToArgs"]));
+ }
+ set {
+ this["SendFileToArgs"] = value;
+ }
+ }
+
+ [global::System.Configuration.UserScopedSettingAttribute()]
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ [global::System.Configuration.DefaultSettingValueAttribute("False")]
+ public bool SendFile {
+ get {
+ return ((bool)(this["SendFile"]));
+ }
+ set {
+ this["SendFile"] = value;
+ }
+ }
}
}
diff --git a/win/CS/HandBrake.ApplicationServices/Properties/Settings.settings b/win/CS/HandBrake.ApplicationServices/Properties/Settings.settings
index 66c42127e..a33570627 100644
--- a/win/CS/HandBrake.ApplicationServices/Properties/Settings.settings
+++ b/win/CS/HandBrake.ApplicationServices/Properties/Settings.settings
@@ -53,5 +53,17 @@
<Setting Name="HandBrakeExeHash" Type="System.String" Scope="User">
<Value Profile="(Default)" />
</Setting>
+ <Setting Name="Setting" Type="System.String" Scope="User">
+ <Value Profile="(Default)" />
+ </Setting>
+ <Setting Name="SendFileTo" Type="System.String" Scope="User">
+ <Value Profile="(Default)" />
+ </Setting>
+ <Setting Name="SendFileToArgs" Type="System.String" Scope="User">
+ <Value Profile="(Default)" />
+ </Setting>
+ <Setting Name="SendFile" Type="System.Boolean" Scope="User">
+ <Value Profile="(Default)">False</Value>
+ </Setting>
</Settings>
</SettingsFile> \ No newline at end of file
diff --git a/win/CS/HandBrake.ApplicationServices/Services/QueueProcessor.cs b/win/CS/HandBrake.ApplicationServices/Services/QueueProcessor.cs
index 6f3bf2c1a..ef95b6388 100644
--- a/win/CS/HandBrake.ApplicationServices/Services/QueueProcessor.cs
+++ b/win/CS/HandBrake.ApplicationServices/Services/QueueProcessor.cs
@@ -203,6 +203,9 @@ namespace HandBrake.ApplicationServices.Services
MessageBox.Show(e.Exception + e.ErrorInformation);
}
+ // Post-Processing
+ SendToApplication(this.QueueManager.LastProcessedJob.Destination);
+
// Handling Log Data
this.EncodeService.ProcessLogs(this.QueueManager.LastProcessedJob.Destination);
@@ -242,6 +245,20 @@ namespace HandBrake.ApplicationServices.Services
}
/// <summary>
+ /// Send a file to a 3rd party application after encoding has completed.
+ /// </summary>
+ /// <param name="file"> The file path</param>
+ private static void SendToApplication(string file)
+ {
+ if (Properties.Settings.Default.SendFile && !string.IsNullOrEmpty(Properties.Settings.Default.SendFileTo))
+ {
+ string args = string.Format("{0} \"{1}\"", Properties.Settings.Default.SendFileToArgs, file);
+ ProcessStartInfo vlc = new ProcessStartInfo(Properties.Settings.Default.SendFileTo, args);
+ Process.Start(vlc);
+ }
+ }
+
+ /// <summary>
/// Perform an action after an encode. e.g a shutdown, standby, restart etc.
/// </summary>
private static void Finish()
diff --git a/win/CS/HandBrake.ApplicationServices/UserSettingConstants.cs b/win/CS/HandBrake.ApplicationServices/UserSettingConstants.cs
index ba61a8255..c79f7e5e8 100644
--- a/win/CS/HandBrake.ApplicationServices/UserSettingConstants.cs
+++ b/win/CS/HandBrake.ApplicationServices/UserSettingConstants.cs
@@ -95,5 +95,20 @@ namespace HandBrake.ApplicationServices
/// Disable Libdvdnav
/// </summary>
public const string DisableLibDvdNav = "DisableLibDvdNav";
+
+ /// <summary>
+ /// Send file enabled.
+ /// </summary>
+ public const string SendFile = "SendFile";
+
+ /// <summary>
+ /// Send file to application path
+ /// </summary>
+ public const string SendFileTo = "SendFileTo";
+
+ /// <summary>
+ /// Send file to arguments
+ /// </summary>
+ public const string SendFileToArgs = "SendFileToArgs";
}
}
diff --git a/win/CS/HandBrake.ApplicationServices/app.config b/win/CS/HandBrake.ApplicationServices/app.config
index d47fd40c8..1146cd5ce 100644
--- a/win/CS/HandBrake.ApplicationServices/app.config
+++ b/win/CS/HandBrake.ApplicationServices/app.config
@@ -63,6 +63,18 @@
<setting name="HandBrakeExeHash" serializeAs="String">
<value />
</setting>
+ <setting name="Setting" serializeAs="String">
+ <value />
+ </setting>
+ <setting name="SendFileTo" serializeAs="String">
+ <value />
+ </setting>
+ <setting name="SendFileToArgs" serializeAs="String">
+ <value />
+ </setting>
+ <setting name="SendFile" serializeAs="String">
+ <value>False</value>
+ </setting>
</HandBrake.ApplicationServices.Properties.Settings>
</userSettings>
</configuration>