diff options
author | sr55 <[email protected]> | 2020-02-05 20:40:36 +0000 |
---|---|---|
committer | sr55 <[email protected]> | 2020-02-05 20:40:36 +0000 |
commit | d8fff96fa0b7c08578bdd8362e7a557c551d24d1 (patch) | |
tree | 9d9be0e95a904bd6d25217999617884da326b97b /win/CS/HandBrakeWPF/ViewModels | |
parent | d388fee8e2773792254373eef770c6948ebbc1d4 (diff) |
WinGui: Fix handling of Estimated Time left when job time >= 1 day. Fixes #2582
Diffstat (limited to 'win/CS/HandBrakeWPF/ViewModels')
-rw-r--r-- | win/CS/HandBrakeWPF/ViewModels/MainViewModel.cs | 4 | ||||
-rw-r--r-- | win/CS/HandBrakeWPF/ViewModels/QueueViewModel.cs | 11 |
2 files changed, 9 insertions, 6 deletions
diff --git a/win/CS/HandBrakeWPF/ViewModels/MainViewModel.cs b/win/CS/HandBrakeWPF/ViewModels/MainViewModel.cs index da77e5502..f4d8cdcf0 100644 --- a/win/CS/HandBrakeWPF/ViewModels/MainViewModel.cs +++ b/win/CS/HandBrakeWPF/ViewModels/MainViewModel.cs @@ -2505,8 +2505,8 @@ namespace HandBrakeWPF.ViewModels {
if (this.queueProcessor.EncodeService.IsEncoding)
{
- string totalHrsLeft = string.Format(@"{0:hh\:mm\:ss}", e.EstimatedTimeLeft);
- string elapsedTimeHrs = string.Format(@"{0:hh\:mm\:ss} ", e.ElapsedTime);
+ string totalHrsLeft = e.EstimatedTimeLeft.Days >= 1 ? string.Format(@"{0:d\:hh\:mm\:ss}", e.EstimatedTimeLeft) : string.Format(@"{0:hh\:mm\:ss}", e.EstimatedTimeLeft);
+ string elapsedTimeHrs = e.ElapsedTime.Days >= 1 ? string.Format(@"{0:d\:hh\:mm\:ss}", e.ElapsedTime) : string.Format(@"{0:hh\:mm\:ss}", e.ElapsedTime);
string jobsPending = string.Format(Resources.Main_JobsPending_addon, this.queueProcessor.Count);
if (e.IsSubtitleScan)
diff --git a/win/CS/HandBrakeWPF/ViewModels/QueueViewModel.cs b/win/CS/HandBrakeWPF/ViewModels/QueueViewModel.cs index f176e2caf..c3020509e 100644 --- a/win/CS/HandBrakeWPF/ViewModels/QueueViewModel.cs +++ b/win/CS/HandBrakeWPF/ViewModels/QueueViewModel.cs @@ -811,14 +811,17 @@ namespace HandBrakeWPF.ViewModels {
this.IntermediateProgress = false;
+ string totalHrsLeft = e.EstimatedTimeLeft.Days >= 1 ? string.Format(@"{0:d\:hh\:mm\:ss}", e.EstimatedTimeLeft) : string.Format(@"{0:hh\:mm\:ss}", e.EstimatedTimeLeft);
+ string elapsedTimeHrs = e.ElapsedTime.Days >= 1 ? string.Format(@"{0:d\:hh\:mm\:ss}", e.ElapsedTime) : string.Format(@"{0:hh\:mm\:ss}", e.ElapsedTime);
+
if (e.IsSubtitleScan)
{
this.JobStatus = string.Format(Resources.MainViewModel_EncodeStatusChanged_SubScan_StatusLabel,
e.Task,
e.TaskCount,
e.PercentComplete,
- e.EstimatedTimeLeft,
- e.ElapsedTime,
+ totalHrsLeft,
+ elapsedTimeHrs,
null);
this.ProgressValue = e.PercentComplete;
@@ -842,8 +845,8 @@ namespace HandBrakeWPF.ViewModels e.PercentComplete,
e.CurrentFrameRate,
e.AverageFrameRate,
- e.EstimatedTimeLeft,
- e.ElapsedTime,
+ totalHrsLeft,
+ elapsedTimeHrs,
null);
this.ProgressValue = e.PercentComplete;
}
|