summaryrefslogtreecommitdiffstats
path: root/win/CS
diff options
context:
space:
mode:
Diffstat (limited to 'win/CS')
-rw-r--r--win/CS/HandBrake.ApplicationServices/Parsing/Title.cs23
1 files changed, 19 insertions, 4 deletions
diff --git a/win/CS/HandBrake.ApplicationServices/Parsing/Title.cs b/win/CS/HandBrake.ApplicationServices/Parsing/Title.cs
index ac8bcf6d3..1453889ed 100644
--- a/win/CS/HandBrake.ApplicationServices/Parsing/Title.cs
+++ b/win/CS/HandBrake.ApplicationServices/Parsing/Title.cs
@@ -11,9 +11,6 @@ namespace HandBrake.ApplicationServices.Parsing
using System.IO;
using System.Text.RegularExpressions;
- using HandBrake.ApplicationServices.Model;
- using HandBrake.ApplicationServices.Model.Encoding;
- using HandBrake.ApplicationServices.Services;
using HandBrake.ApplicationServices.Services.Interfaces;
using HandBrake.Interop.Model;
@@ -67,6 +64,11 @@ namespace HandBrake.ApplicationServices.Parsing
public int TitleNumber { get; set; }
/// <summary>
+ /// Gets or sets Playlist.
+ /// </summary>
+ public string Playlist { get; set; }
+
+ /// <summary>
/// Gets or sets the length in time of this Title
/// </summary>
public TimeSpan Duration { get; set; }
@@ -150,6 +152,14 @@ namespace HandBrake.ApplicationServices.Parsing
nextLine = output.ReadLine();
}
+ // Playlist
+ m = Regex.Match(nextLine, @"^ \+ playlist:");
+ if (m.Success)
+ {
+ thisTitle.Playlist = nextLine.Replace("+ playlist:", string.Empty).Trim();
+ nextLine = output.ReadLine();
+ }
+
// Jump over the VTS and blocks line
m = Regex.Match(nextLine, @"^ \+ vts:");
if (nextLine.Contains("blocks") || nextLine.Contains("+ vts "))
@@ -257,7 +267,12 @@ namespace HandBrake.ApplicationServices.Parsing
/// <returns>A string representing this track in the format: {title #} (00:00:00)</returns>
public override string ToString()
{
- return string.Format("{0} ({1:00}:{2:00}:{3:00})", TitleNumber, Duration.Hours, Duration.Minutes, Duration.Seconds);
+ if (!string.IsNullOrEmpty(this.Playlist))
+ {
+ this.Playlist = string.Format(" {0}", this.Playlist);
+ }
+
+ return string.Format("{0}{1} ({2:00}:{3:00}:{4:00})", TitleNumber, Playlist, Duration.Hours, Duration.Minutes, Duration.Seconds);
}
}
} \ No newline at end of file