diff options
author | sr55 <[email protected]> | 2014-10-05 21:39:21 +0000 |
---|---|---|
committer | sr55 <[email protected]> | 2014-10-05 21:39:21 +0000 |
commit | 9bb7ba9388f0efaf4c73add6c5e11d198478272b (patch) | |
tree | 0d706e834023e629a44a5ed63f792f0fd34ccfb2 /win/CS/HandBrakeWPF/ViewModels | |
parent | ef651f58cf21f0ec89a8db3e7e812ceae16d099d (diff) |
WinGui: Fix Playlist not displaying for bluray titles.
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@6434 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'win/CS/HandBrakeWPF/ViewModels')
-rw-r--r-- | win/CS/HandBrakeWPF/ViewModels/MainViewModel.cs | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/win/CS/HandBrakeWPF/ViewModels/MainViewModel.cs b/win/CS/HandBrakeWPF/ViewModels/MainViewModel.cs index fafc1ce2b..2bd91de96 100644 --- a/win/CS/HandBrakeWPF/ViewModels/MainViewModel.cs +++ b/win/CS/HandBrakeWPF/ViewModels/MainViewModel.cs @@ -743,7 +743,7 @@ namespace HandBrakeWPF.ViewModels }
this.NotifyOfPropertyChange(() => this.CurrentTask);
- this.Duration = this.selectedTitle.Duration.ToString("g");
+ this.Duration = this.DurationCalculation();
// Setup the tab controls
this.SetupTabs();
@@ -1898,15 +1898,20 @@ namespace HandBrakeWPF.ViewModels }
double startEndDuration = this.SelectedEndPoint - this.SelectedStartPoint;
+ TimeSpan output;
+
switch (this.SelectedPointToPoint)
{
case PointToPointMode.Chapters:
- return this.SelectedTitle.CalculateDuration(this.SelectedStartPoint, this.SelectedEndPoint).ToString("g");
+ output = this.SelectedTitle.CalculateDuration(this.SelectedStartPoint, this.SelectedEndPoint);
+ return string.Format("{0:00}:{1:00}:{2:00}", output.Hours, output.Minutes, output.Seconds);
case PointToPointMode.Seconds:
- return TimeSpan.FromSeconds(startEndDuration).ToString("g");
+ output = TimeSpan.FromSeconds(startEndDuration);
+ return string.Format("{0:00}:{1:00}:{2:00}", output.Hours, output.Minutes, output.Seconds);
case PointToPointMode.Frames:
startEndDuration = startEndDuration / selectedTitle.Fps;
- return TimeSpan.FromSeconds(Math.Round(startEndDuration, 2)).ToString("g");
+ output = TimeSpan.FromSeconds(Math.Round(startEndDuration, 2));
+ return string.Format("{0:00}:{1:00}:{2:00}", output.Hours, output.Minutes, output.Seconds);
}
return "--:--:--";
|