diff options
author | sr55 <[email protected]> | 2011-08-16 15:36:39 +0000 |
---|---|---|
committer | sr55 <[email protected]> | 2011-08-16 15:36:39 +0000 |
commit | 356f4d167d59fb486541c280867f1b27a7d05690 (patch) | |
tree | 637c994418f5b4b78d087eac523f3f9f880787ed /win/CS | |
parent | 054ccc3e7f749bd57950eb79e3286155516f5dca (diff) |
WinGui: Add support for upcoming changes to CLI scan output showing bluray playlist number.
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4181 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'win/CS')
-rw-r--r-- | win/CS/HandBrake.ApplicationServices/Parsing/Title.cs | 23 |
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 |