summaryrefslogtreecommitdiffstats
path: root/win/CS
diff options
context:
space:
mode:
Diffstat (limited to 'win/CS')
-rw-r--r--win/CS/HandBrake.ApplicationServices/Services/LibScan.cs3
-rw-r--r--win/CS/HandBrake.Interop/HandBrakeInterop/HandBrakeInstance.cs3
-rw-r--r--win/CS/HandBrake.Interop/HandBrakeInterop/SourceData/Chapter.cs5
3 files changed, 9 insertions, 2 deletions
diff --git a/win/CS/HandBrake.ApplicationServices/Services/LibScan.cs b/win/CS/HandBrake.ApplicationServices/Services/LibScan.cs
index 24c364024..7831f6bb2 100644
--- a/win/CS/HandBrake.ApplicationServices/Services/LibScan.cs
+++ b/win/CS/HandBrake.ApplicationServices/Services/LibScan.cs
@@ -460,7 +460,8 @@ namespace HandBrake.ApplicationServices.Services
foreach (Interop.SourceData.Chapter chapter in title.Chapters)
{
- converted.Chapters.Add(new Chapter(chapter.ChapterNumber, string.Empty, chapter.Duration));
+ string chapterName = !string.IsNullOrEmpty(chapter.Name) ? chapter.Name : string.Empty;
+ converted.Chapters.Add(new Chapter(chapter.ChapterNumber, chapterName, chapter.Duration));
}
foreach (Interop.SourceData.AudioTrack track in title.AudioTracks)
diff --git a/win/CS/HandBrake.Interop/HandBrakeInterop/HandBrakeInstance.cs b/win/CS/HandBrake.Interop/HandBrakeInterop/HandBrakeInstance.cs
index af3a56ee4..494a8d717 100644
--- a/win/CS/HandBrake.Interop/HandBrakeInterop/HandBrakeInstance.cs
+++ b/win/CS/HandBrake.Interop/HandBrakeInterop/HandBrakeInstance.cs
@@ -1892,9 +1892,10 @@ namespace HandBrake.Interop
List<hb_chapter_s> chapterList = title.list_chapter.ToList<hb_chapter_s>();
foreach (hb_chapter_s chapter in chapterList)
- {
+ {
var newChapter = new Chapter
{
+ Name = chapter.title,
ChapterNumber = chapter.index,
Duration = Converters.PtsToTimeSpan(chapter.duration),
DurationPts = chapter.duration
diff --git a/win/CS/HandBrake.Interop/HandBrakeInterop/SourceData/Chapter.cs b/win/CS/HandBrake.Interop/HandBrakeInterop/SourceData/Chapter.cs
index 411a8d851..25d5b811b 100644
--- a/win/CS/HandBrake.Interop/HandBrakeInterop/SourceData/Chapter.cs
+++ b/win/CS/HandBrake.Interop/HandBrakeInterop/SourceData/Chapter.cs
@@ -17,6 +17,11 @@ namespace HandBrake.Interop.SourceData
/// </summary>
public class Chapter
{
+ /// <summary>
+ /// Gets or sets the name.
+ /// </summary>
+ public string Name { get; set; }
+
/// <summary>
/// Gets or sets the number of this Chapter, in regards to its parent Title
/// </summary>