diff options
author | sr55 <[email protected]> | 2009-09-30 14:39:12 +0000 |
---|---|---|
committer | sr55 <[email protected]> | 2009-09-30 14:39:12 +0000 |
commit | 6a2e47339a1dd65c4866c1d907f6b74565953e02 (patch) | |
tree | 594ec3a1de7da1255432844de2d7540453f5b033 /win/C#/EncodeQueue/EncodeAndQueueHandler.cs | |
parent | 7a88c8b6b3a1ba9f5ca08d1c9b235b0dfd2d1d1d (diff) |
WinGui:
- Add a notice to the log to indicate if the user has used a custom query.
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@2854 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'win/C#/EncodeQueue/EncodeAndQueueHandler.cs')
-rw-r--r-- | win/C#/EncodeQueue/EncodeAndQueueHandler.cs | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/win/C#/EncodeQueue/EncodeAndQueueHandler.cs b/win/C#/EncodeQueue/EncodeAndQueueHandler.cs index 93cab845a..f2a4eaedf 100644 --- a/win/C#/EncodeQueue/EncodeAndQueueHandler.cs +++ b/win/C#/EncodeQueue/EncodeAndQueueHandler.cs @@ -82,9 +82,10 @@ namespace Handbrake.EncodeQueue /// <param name="query">The query that will be passed to the HandBrake CLI.</param>
/// <param name="source">The location of the source video.</param>
/// <param name="destination">The location where the encoded video will be.</param>
- public void AddJob(string query, string source, string destination)
+ /// <param name="customJob"></param>
+ public void AddJob(string query, string source, string destination, bool customJob)
{
- Job newJob = new Job { Id = nextJobId++, Query = query, Source = source, Destination = destination };
+ Job newJob = new Job { Id = nextJobId++, Query = query, Source = source, Destination = destination, CustomQuery = customJob };
queue.Add(newJob);
WriteQueueStateToFile("hb_queue_recovery.xml");
@@ -306,7 +307,8 @@ namespace Handbrake.EncodeQueue // Run through each item on the queue
while (this.Count != 0)
{
- string query = GetNextJob().Query;
+ Job encJob = GetNextJob();
+ string query = encJob.Query;
WriteQueueStateToFile("hb_queue_recovery.xml"); // Update the queue recovery file
RunCli(query);
@@ -316,7 +318,7 @@ namespace Handbrake.EncodeQueue hbProcess.WaitForExit();
- AddCLIQueryToLog(query);
+ AddCLIQueryToLog(encJob);
CopyLog(LastEncode.Destination);
hbProcess.Close();
@@ -469,7 +471,7 @@ namespace Handbrake.EncodeQueue /// Append the CLI query to the start of the log file.
/// </summary>
/// <param name="query"></param>
- private static void AddCLIQueryToLog(string query)
+ private static void AddCLIQueryToLog(Job encJob)
{
string logDir = Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) + "\\HandBrake\\logs";
string logPath = Path.Combine(logDir, "last_encode_log.txt");
@@ -480,7 +482,8 @@ namespace Handbrake.EncodeQueue StreamWriter writer = new StreamWriter(File.Create(logPath));
- writer.Write("### CLI Query: " + query + "\n\n");
+ writer.Write("### CLI Query: " + encJob.Query + "\n\n");
+ writer.Write("### User Query: " + encJob.CustomQuery + "\n\n");
writer.Write("#########################################\n\n");
writer.WriteLine(log);
writer.Flush();
|