summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorsr55 <[email protected]>2014-10-05 21:39:21 +0000
committersr55 <[email protected]>2014-10-05 21:39:21 +0000
commit9bb7ba9388f0efaf4c73add6c5e11d198478272b (patch)
tree0d706e834023e629a44a5ed63f792f0fd34ccfb2
parentef651f58cf21f0ec89a8db3e7e812ceae16d099d (diff)
WinGui: Fix Playlist not displaying for bluray titles.
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@6434 b64f7644-9d1e-0410-96f1-a4d463321fa5
-rw-r--r--win/CS/HandBrake.ApplicationServices/Services/LibScan.cs10
-rw-r--r--win/CS/HandBrakeWPF/ViewModels/MainViewModel.cs13
-rw-r--r--win/CS/HandBrakeWPF/Views/MainView.xaml9
3 files changed, 22 insertions, 10 deletions
diff --git a/win/CS/HandBrake.ApplicationServices/Services/LibScan.cs b/win/CS/HandBrake.ApplicationServices/Services/LibScan.cs
index f7d07efb2..fd113c3a4 100644
--- a/win/CS/HandBrake.ApplicationServices/Services/LibScan.cs
+++ b/win/CS/HandBrake.ApplicationServices/Services/LibScan.cs
@@ -13,11 +13,11 @@ namespace HandBrake.ApplicationServices.Services
using System.Collections.Generic;
using System.IO;
using System.Text;
+ using System.Text.RegularExpressions;
using System.Windows.Media.Imaging;
using HandBrake.ApplicationServices.EventArgs;
using HandBrake.ApplicationServices.Model;
- using HandBrake.ApplicationServices.Model.Encoding;
using HandBrake.ApplicationServices.Parsing;
using HandBrake.ApplicationServices.Services.Interfaces;
using HandBrake.ApplicationServices.Utilities;
@@ -25,10 +25,15 @@ namespace HandBrake.ApplicationServices.Services
using HandBrake.Interop.EventArgs;
using HandBrake.Interop.Interfaces;
using HandBrake.Interop.Model;
+ using HandBrake.Interop.SourceData;
using AudioTrack = HandBrake.ApplicationServices.Parsing.Audio;
+ using Chapter = HandBrake.ApplicationServices.Parsing.Chapter;
using ScanProgressEventArgs = HandBrake.Interop.EventArgs.ScanProgressEventArgs;
using Size = System.Drawing.Size;
+ using Subtitle = HandBrake.ApplicationServices.Parsing.Subtitle;
+ using SubtitleType = HandBrake.ApplicationServices.Model.Encoding.SubtitleType;
+ using Title = HandBrake.ApplicationServices.Parsing.Title;
/// <summary>
/// Scan a Source
@@ -465,7 +470,8 @@ namespace HandBrake.ApplicationServices.Services
AutoCropDimensions = title.AutoCropDimensions,
Fps = title.Framerate,
SourceName = title.Path,
- MainTitle = title.TitleNumber == featureTitle
+ MainTitle = title.TitleNumber == featureTitle,
+ Playlist = title.InputType == InputType.Bluray ? string.Format(" {0:d5}.MPLS", title.Playlist).Trim() : null
};
foreach (Interop.SourceData.Chapter chapter in title.Chapters)
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 "--:--:--";
diff --git a/win/CS/HandBrakeWPF/Views/MainView.xaml b/win/CS/HandBrakeWPF/Views/MainView.xaml
index 945835524..6442e9e45 100644
--- a/win/CS/HandBrakeWPF/Views/MainView.xaml
+++ b/win/CS/HandBrakeWPF/Views/MainView.xaml
@@ -416,10 +416,10 @@
ConverterParameter=false}"
/>
- <Label Margin="8,0,0,0" Content="through" />
+ <Label Margin="4,0,0,0" Content="through" />
<ComboBox Name="EndPoint"
MinWidth="60"
- Margin="8,0,0,0"
+ Margin="4,0,0,0"
ItemsSource="{Binding StartEndRangeItems}"
SelectedItem="{Binding SelectedEndPoint}"
Visibility="{Binding ShowTextEntryForPointToPointMode,
@@ -433,8 +433,9 @@
ConverterParameter=false}"
/>
- <Label Margin="8,0,0,0" Content="Duration" />
- <Label Margin="8,0,0,0" Content="{Binding Duration}" />
+ <Label Margin="4,0,0,0" Content="Duration" />
+ <Label Margin="4,0,0,0" Content="{Binding Duration}" />
+
</StackPanel>
</StackPanel>
</StackPanel>