diff options
Diffstat (limited to 'win/CS/HandBrakeWPF')
5 files changed, 25 insertions, 11 deletions
diff --git a/win/CS/HandBrakeWPF/Properties/Resources.Designer.cs b/win/CS/HandBrakeWPF/Properties/Resources.Designer.cs index d34a8483b..781f80286 100644 --- a/win/CS/HandBrakeWPF/Properties/Resources.Designer.cs +++ b/win/CS/HandBrakeWPF/Properties/Resources.Designer.cs @@ -1719,7 +1719,7 @@ namespace HandBrakeWPF.Properties { } /// <summary> - /// Looks up a localized string similar to {0} Encodes Pending. + /// Looks up a localized string similar to {0} Jobs Pending. /// </summary> public static string Main_XEncodesPending { get { diff --git a/win/CS/HandBrakeWPF/Properties/Resources.resx b/win/CS/HandBrakeWPF/Properties/Resources.resx index 1293d8ab0..60b586ddb 100644 --- a/win/CS/HandBrakeWPF/Properties/Resources.resx +++ b/win/CS/HandBrakeWPF/Properties/Resources.resx @@ -283,7 +283,7 @@ The previous user_presets.xml file was backed up.</value> <value>Select 'Source' to continue</value>
</data>
<data name="Main_XEncodesPending" xml:space="preserve">
- <value>{0} Encodes Pending</value>
+ <value>{0} Jobs Pending</value>
</data>
<data name="Notice" xml:space="preserve">
<value>Notice</value>
diff --git a/win/CS/HandBrakeWPF/Services/Queue/Interfaces/IQueueService.cs b/win/CS/HandBrakeWPF/Services/Queue/Interfaces/IQueueService.cs index 18e74989d..1bab4f01d 100644 --- a/win/CS/HandBrakeWPF/Services/Queue/Interfaces/IQueueService.cs +++ b/win/CS/HandBrakeWPF/Services/Queue/Interfaces/IQueueService.cs @@ -94,6 +94,14 @@ namespace HandBrakeWPF.Services.Queue.Interfaces void Add(QueueTask job); /// <summary> + /// Retry a job and update the queue status + /// </summary> + /// <param name="task"> + /// The job to retry + /// </param> + void RetryJob(QueueTask task); + + /// <summary> /// Backup any changes to the queue file /// </summary> /// <param name="exportPath"> diff --git a/win/CS/HandBrakeWPF/Services/Queue/QueueService.cs b/win/CS/HandBrakeWPF/Services/Queue/QueueService.cs index c231e65ec..9e1c37bc9 100644 --- a/win/CS/HandBrakeWPF/Services/Queue/QueueService.cs +++ b/win/CS/HandBrakeWPF/Services/Queue/QueueService.cs @@ -221,6 +221,20 @@ namespace HandBrakeWPF.Services.Queue return false; } + public void RetryJob(QueueTask task) + { + if (task == null) + { + return; + } + + task.Status = QueueItemStatus.Waiting; + task.Statistics.Reset(); + this.BackupQueue(null); + + this.InvokeQueueChanged(EventArgs.Empty); + } + public void Clear() { List<QueueTask> deleteList = this.queue.Where(i => i.Status != QueueItemStatus.InProgress).ToList(); diff --git a/win/CS/HandBrakeWPF/ViewModels/QueueViewModel.cs b/win/CS/HandBrakeWPF/ViewModels/QueueViewModel.cs index 6d9ccdfec..f176e2caf 100644 --- a/win/CS/HandBrakeWPF/ViewModels/QueueViewModel.cs +++ b/win/CS/HandBrakeWPF/ViewModels/QueueViewModel.cs @@ -459,14 +459,7 @@ namespace HandBrakeWPF.ViewModels /// </param>
public void RetryJob(QueueTask task)
{
- if (task == null)
- {
- return;
- }
-
- task.Status = QueueItemStatus.Waiting;
- task.Statistics.Reset();
- this.queueProcessor.BackupQueue(null);
+ this.queueProcessor.RetryJob(task);
this.JobsPending = string.Format(Resources.QueueViewModel_JobsPending, this.queueProcessor.Count);
this.NotifyOfPropertyChange(() => this.CanRetryJob);
}
@@ -787,7 +780,6 @@ namespace HandBrakeWPF.ViewModels string logContent = logReader.ReadToEnd();
this.ActivityLog = logContent;
}
-
}
else
{
|