summaryrefslogtreecommitdiffstats
path: root/win/CS/HandBrake.ApplicationServices/Services/QueueProcessor.cs
diff options
context:
space:
mode:
authorsr55 <[email protected]>2011-04-15 20:01:00 +0000
committersr55 <[email protected]>2011-04-15 20:01:00 +0000
commit70fee546acaf4db3efb690ac4aaa09e0f4cb65e8 (patch)
tree3f53a1b58bbe70ca017f487313b847c8f248bc80 /win/CS/HandBrake.ApplicationServices/Services/QueueProcessor.cs
parent463b2127304a4701fcfff7f499d4dfc31828075c (diff)
WinGui:
- Add "Send to" option. This will pass the encoded output file name of each completed job on the queue to a 3rd party application with optional arguments passed. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@3928 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'win/CS/HandBrake.ApplicationServices/Services/QueueProcessor.cs')
-rw-r--r--win/CS/HandBrake.ApplicationServices/Services/QueueProcessor.cs17
1 files changed, 17 insertions, 0 deletions
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()