summaryrefslogtreecommitdiffstats
path: root/win/CS/HandBrakeWPF/ViewModels
diff options
context:
space:
mode:
authorsr55 <[email protected]>2017-04-15 12:26:59 +0100
committersr55 <[email protected]>2017-04-15 12:27:19 +0100
commit52d4c21b22cfc91b63a680aa7e475cc0ca6012cb (patch)
treed742c17b8ddff744d10ec5ee79344355aa17a907 /win/CS/HandBrakeWPF/ViewModels
parenta0fefdaf374c7e7b0bbf58482b86bac03d673a7c (diff)
WinGui: Handle HB_STATE_MUXING and HB_STATE_SEARCHING for better progress indication in the UI. #676
Diffstat (limited to 'win/CS/HandBrakeWPF/ViewModels')
-rw-r--r--win/CS/HandBrakeWPF/ViewModels/MainViewModel.cs10
-rw-r--r--win/CS/HandBrakeWPF/ViewModels/QueueViewModel.cs42
2 files changed, 41 insertions, 11 deletions
diff --git a/win/CS/HandBrakeWPF/ViewModels/MainViewModel.cs b/win/CS/HandBrakeWPF/ViewModels/MainViewModel.cs
index 283111b11..9bb991efc 100644
--- a/win/CS/HandBrakeWPF/ViewModels/MainViewModel.cs
+++ b/win/CS/HandBrakeWPF/ViewModels/MainViewModel.cs
@@ -2420,7 +2420,7 @@ namespace HandBrakeWPF.ViewModels
if (this.queueProcessor.EncodeService.IsEncoding)
{
string jobsPending = string.Format(Resources.Main_JobsPending_addon, this.queueProcessor.Count);
- if (e.PassId == -1)
+ if (e.IsSubtitleScan)
{
this.ProgramStatusLabel = string.Format(Resources.MainViewModel_EncodeStatusChanged_SubScan_StatusLabel,
e.Task,
@@ -2430,6 +2430,14 @@ namespace HandBrakeWPF.ViewModels
e.ElapsedTime,
jobsPending);
}
+ else if (e.IsMuxing)
+ {
+ this.ProgramStatusLabel = ResourcesUI.MainView_Muxing;
+ }
+ else if (e.IsSearching)
+ {
+ this.ProgramStatusLabel = string.Format(ResourcesUI.MainView_ProgressStatusWithTask, ResourcesUI.MainView_Searching, e.PercentComplete, e.EstimatedTimeLeft, jobsPending);
+ }
else
{
this.ProgramStatusLabel =
diff --git a/win/CS/HandBrakeWPF/ViewModels/QueueViewModel.cs b/win/CS/HandBrakeWPF/ViewModels/QueueViewModel.cs
index c5351d729..2267c1a44 100644
--- a/win/CS/HandBrakeWPF/ViewModels/QueueViewModel.cs
+++ b/win/CS/HandBrakeWPF/ViewModels/QueueViewModel.cs
@@ -519,16 +519,38 @@ namespace HandBrakeWPF.ViewModels
{
Execute.OnUIThread(() =>
{
- this.JobStatus =
- string.Format(
- Resources.QueueViewModel_QueueStatusDisplay,
- e.Task,
- e.TaskCount,
- e.PercentComplete,
- e.CurrentFrameRate,
- e.AverageFrameRate,
- e.EstimatedTimeLeft,
- e.ElapsedTime);
+ string jobsPending = string.Format(Resources.Main_JobsPending_addon, this.queueProcessor.Count);
+ if (e.IsSubtitleScan)
+ {
+ this.JobStatus = string.Format(Resources.MainViewModel_EncodeStatusChanged_SubScan_StatusLabel,
+ e.Task,
+ e.TaskCount,
+ e.PercentComplete,
+ e.EstimatedTimeLeft,
+ e.ElapsedTime,
+ jobsPending);
+ }
+ else if (e.IsMuxing)
+ {
+ this.JobStatus = ResourcesUI.MainView_Muxing;
+ }
+ else if (e.IsSearching)
+ {
+ this.JobStatus = string.Format(ResourcesUI.MainView_ProgressStatusWithTask, ResourcesUI.MainView_Searching, e.PercentComplete, e.EstimatedTimeLeft, jobsPending);
+ }
+ else
+ {
+ this.JobStatus =
+ string.Format(Resources.MainViewModel_EncodeStatusChanged_StatusLabel,
+ e.Task,
+ e.TaskCount,
+ e.PercentComplete,
+ e.CurrentFrameRate,
+ e.AverageFrameRate,
+ e.EstimatedTimeLeft,
+ e.ElapsedTime,
+ jobsPending);
+ }
});
}