diff options
author | randomengy <[email protected]> | 2012-12-02 22:40:37 +0000 |
---|---|---|
committer | randomengy <[email protected]> | 2012-12-02 22:40:37 +0000 |
commit | 900b57a83dfa9a78c3f5a0673f052fff9ba6d302 (patch) | |
tree | c293345ef4b34417d591da89faee362165fe8dae /win/CS/HandBrake.Interop/HandBrakeInterop/SourceData/Title.cs | |
parent | 37035605b849ada282844a936d106a9042d8a0b2 (diff) |
Interop: Fixing title number/title index mixup. Adding Playlist to the Title object.
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@5088 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'win/CS/HandBrake.Interop/HandBrakeInterop/SourceData/Title.cs')
-rw-r--r-- | win/CS/HandBrake.Interop/HandBrakeInterop/SourceData/Title.cs | 22 |
1 files changed, 19 insertions, 3 deletions
diff --git a/win/CS/HandBrake.Interop/HandBrakeInterop/SourceData/Title.cs b/win/CS/HandBrake.Interop/HandBrakeInterop/SourceData/Title.cs index 06b1acdef..344759c1d 100644 --- a/win/CS/HandBrake.Interop/HandBrakeInterop/SourceData/Title.cs +++ b/win/CS/HandBrake.Interop/HandBrakeInterop/SourceData/Title.cs @@ -68,6 +68,11 @@ namespace HandBrake.Interop.SourceData public int TitleNumber { get; set; }
/// <summary>
+ /// Gets or sets the playlist number this title came from.
+ /// </summary>
+ public int Playlist { get; set; }
+
+ /// <summary>
/// Gets or sets the length in time of this Title
/// </summary>
public TimeSpan Duration { get; set; }
@@ -131,11 +136,22 @@ namespace HandBrake.Interop.SourceData /// <summary>
/// Override of the ToString method to provide an easy way to use this object in the UI
/// </summary>
- /// <returns>A string representing this track in the format: {title #} (00:00:00)</returns>
+ /// <returns>A string representing this track in the format: {title #}[ {playlist source}] (00:00:00)</returns>
public override string ToString()
{
- return string.Format("{0} ({1:00}:{2:00}:{3:00})", this.TitleNumber, this.Duration.Hours,
- this.Duration.Minutes, this.Duration.Seconds);
+ string playlistPortion = string.Empty;
+ if (this.InputType == InputType.Bluray)
+ {
+ playlistPortion = string.Format(" {0:d5}.MPLS", this.Playlist);
+ }
+
+ return string.Format(
+ "{0}{1} ({2:00}:{3:00}:{4:00})",
+ this.TitleNumber,
+ playlistPortion,
+ this.Duration.Hours,
+ this.Duration.Minutes,
+ this.Duration.Seconds);
}
/// <summary>
|