using System.IO;\r
using System.Text.RegularExpressions;\r
\r
- using HandBrake.ApplicationServices.Model;\r
- using HandBrake.ApplicationServices.Model.Encoding;\r
- using HandBrake.ApplicationServices.Services;\r
using HandBrake.ApplicationServices.Services.Interfaces;\r
using HandBrake.Interop.Model;\r
\r
/// </summary>\r
public int TitleNumber { get; set; }\r
\r
+ /// <summary>\r
+ /// Gets or sets Playlist.\r
+ /// </summary>\r
+ public string Playlist { get; set; }\r
+\r
/// <summary>\r
/// Gets or sets the length in time of this Title\r
/// </summary>\r
nextLine = output.ReadLine();\r
}\r
\r
+ // Playlist\r
+ m = Regex.Match(nextLine, @"^ \+ playlist:");\r
+ if (m.Success)\r
+ {\r
+ thisTitle.Playlist = nextLine.Replace("+ playlist:", string.Empty).Trim();\r
+ nextLine = output.ReadLine();\r
+ }\r
+\r
// Jump over the VTS and blocks line\r
m = Regex.Match(nextLine, @"^ \+ vts:");\r
if (nextLine.Contains("blocks") || nextLine.Contains("+ vts "))\r
/// <returns>A string representing this track in the format: {title #} (00:00:00)</returns>\r
public override string ToString()\r
{\r
- return string.Format("{0} ({1:00}:{2:00}:{3:00})", TitleNumber, Duration.Hours, Duration.Minutes, Duration.Seconds);\r
+ if (!string.IsNullOrEmpty(this.Playlist))\r
+ {\r
+ this.Playlist = string.Format(" {0}", this.Playlist);\r
+ }\r
+\r
+ return string.Format("{0}{1} ({2:00}:{3:00}:{4:00})", TitleNumber, Playlist, Duration.Hours, Duration.Minutes, Duration.Seconds);\r
}\r
}\r
}
\ No newline at end of file