summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--win/CS/HandBrakeWPF/Properties/ResourcesUI.Designer.cs18
-rw-r--r--win/CS/HandBrakeWPF/Properties/ResourcesUI.resx6
-rw-r--r--win/CS/HandBrakeWPF/ViewModels/QueueViewModel.cs22
-rw-r--r--win/CS/HandBrakeWPF/Views/Queue/QueueTwoContent.xaml3
4 files changed, 49 insertions, 0 deletions
diff --git a/win/CS/HandBrakeWPF/Properties/ResourcesUI.Designer.cs b/win/CS/HandBrakeWPF/Properties/ResourcesUI.Designer.cs
index e1e5222c4..c4c264908 100644
--- a/win/CS/HandBrakeWPF/Properties/ResourcesUI.Designer.cs
+++ b/win/CS/HandBrakeWPF/Properties/ResourcesUI.Designer.cs
@@ -2259,6 +2259,24 @@ namespace HandBrakeWPF.Properties {
}
/// <summary>
+ /// Looks up a localized string similar to Retry All Jobs.
+ /// </summary>
+ public static string QueueView_ResetAllJobs {
+ get {
+ return ResourceManager.GetString("QueueView_ResetAllJobs", resourceCulture);
+ }
+ }
+
+ /// <summary>
+ /// Looks up a localized string similar to Retry Selected Jobs.
+ /// </summary>
+ public static string QueueView_ResetSelectedJobs {
+ get {
+ return ResourceManager.GetString("QueueView_ResetSelectedJobs", resourceCulture);
+ }
+ }
+
+ /// <summary>
/// Looks up a localized string similar to Shutdown.
/// </summary>
public static string QueueView_Shutdown {
diff --git a/win/CS/HandBrakeWPF/Properties/ResourcesUI.resx b/win/CS/HandBrakeWPF/Properties/ResourcesUI.resx
index 9f7a186b9..fb2bc3da7 100644
--- a/win/CS/HandBrakeWPF/Properties/ResourcesUI.resx
+++ b/win/CS/HandBrakeWPF/Properties/ResourcesUI.resx
@@ -1079,6 +1079,12 @@ This will not affect your current settings in the Subtitle tab.</value>
<data name="QueueView_LogNotAvailableYet" xml:space="preserve">
<value>The log will be available after the encode completes.</value>
</data>
+ <data name="QueueView_ResetAllJobs" xml:space="preserve">
+ <value>Retry All Jobs</value>
+ </data>
+ <data name="QueueView_ResetSelectedJobs" xml:space="preserve">
+ <value>Retry Selected Jobs</value>
+ </data>
<data name="QueueView_Statistics" xml:space="preserve">
<value>Statistics</value>
</data>
diff --git a/win/CS/HandBrakeWPF/ViewModels/QueueViewModel.cs b/win/CS/HandBrakeWPF/ViewModels/QueueViewModel.cs
index c393176fd..83240d586 100644
--- a/win/CS/HandBrakeWPF/ViewModels/QueueViewModel.cs
+++ b/win/CS/HandBrakeWPF/ViewModels/QueueViewModel.cs
@@ -541,6 +541,28 @@ namespace HandBrakeWPF.ViewModels
}
}
+ public void ResetSelectedJobs()
+ {
+ foreach (var task in this.SelectedItems)
+ {
+ if (task.Status == QueueItemStatus.Completed || task.Status == QueueItemStatus.Error)
+ {
+ this.RetryJob(task);
+ }
+ }
+ }
+
+ public void ResetAllJobs()
+ {
+ foreach (var task in this.QueueTasks)
+ {
+ if (task.Status == QueueItemStatus.Completed || task.Status == QueueItemStatus.Error)
+ {
+ this.RetryJob(task);
+ }
+ }
+ }
+
#endregion
#region Methods
diff --git a/win/CS/HandBrakeWPF/Views/Queue/QueueTwoContent.xaml b/win/CS/HandBrakeWPF/Views/Queue/QueueTwoContent.xaml
index 61acb9962..5df7832d2 100644
--- a/win/CS/HandBrakeWPF/Views/Queue/QueueTwoContent.xaml
+++ b/win/CS/HandBrakeWPF/Views/Queue/QueueTwoContent.xaml
@@ -153,6 +153,9 @@
<MenuItem cal:Message.Attach="[Event Click] = [Action StartQueue]" Header="{x:Static Properties:ResourcesUI.QueueView_Start}" />
<MenuItem cal:Message.Attach="[Event Click] = [Action PauseQueue]" Header="{x:Static Properties:ResourcesUI.QueueView_Pause}" />
<Separator />
+ <MenuItem cal:Message.Attach="[Event Click] = [Action ResetSelectedJobs]" Header="{x:Static Properties:ResourcesUI.QueueView_ResetSelectedJobs}" />
+ <MenuItem cal:Message.Attach="[Event Click] = [Action ResetAllJobs]" Header="{x:Static Properties:ResourcesUI.QueueView_ResetAllJobs}" />
+ <Separator />
<MenuItem cal:Message.Attach="[Event Click] = [Action ClearCompleted]" Header="{x:Static Properties:ResourcesUI.QueueView_ClearCompleted}" />
<MenuItem cal:Message.Attach="[Event Click] = [Action Clear]" Header="{x:Static Properties:ResourcesUI.QueueView_ClearAll}" />
<MenuItem cal:Message.Attach="[Event Click] = [Action RemoveSelectedJobs]" Header="{x:Static Properties:ResourcesUI.QueueView_ClearSelected}" />