diff options
| author | Luke Pulverenti <luke.pulverenti@gmail.com> | 2014-03-26 13:14:20 -0400 |
|---|---|---|
| committer | Luke Pulverenti <luke.pulverenti@gmail.com> | 2014-03-26 13:14:20 -0400 |
| commit | 80d84225b7e105add55b44293beb7916ebda140f (patch) | |
| tree | f055c47b29494c593e4345bf17335dac8659e801 | |
| parent | 20d2313fddf8d5bca744ad4154f6c43a29589741 (diff) | |
fixes #746 - Problems with playstate for multiple local trailers for the same movie
| -rw-r--r-- | MediaBrowser.Controller/Entities/Trailer.cs | 19 |
1 files changed, 13 insertions, 6 deletions
diff --git a/MediaBrowser.Controller/Entities/Trailer.cs b/MediaBrowser.Controller/Entities/Trailer.cs index b3d73dc34..53ec030a7 100644 --- a/MediaBrowser.Controller/Entities/Trailer.cs +++ b/MediaBrowser.Controller/Entities/Trailer.cs @@ -3,8 +3,9 @@ using MediaBrowser.Model.Configuration; using MediaBrowser.Model.Entities; using System; using System.Collections.Generic; -using System.Runtime.Serialization; +using System.Globalization; using System.Linq; +using System.Runtime.Serialization; namespace MediaBrowser.Controller.Entities { @@ -22,7 +23,7 @@ namespace MediaBrowser.Controller.Entities /// </summary> /// <value>The preferred metadata country code.</value> public string PreferredMetadataCountryCode { get; set; } - + public Trailer() { RemoteTrailers = new List<MediaUrl>(); @@ -33,19 +34,19 @@ namespace MediaBrowser.Controller.Entities } public float? Metascore { get; set; } - + public List<Guid> LocalTrailerIds { get; set; } - + public List<MediaUrl> RemoteTrailers { get; set; } public List<string> Keywords { get; set; } - + /// <summary> /// Gets or sets the taglines. /// </summary> /// <value>The taglines.</value> public List<string> Taglines { get; set; } - + /// <summary> /// Gets or sets the budget. /// </summary> @@ -92,6 +93,12 @@ namespace MediaBrowser.Controller.Entities { key = key + "-trailer"; + // Make sure different trailers have their own data. + if (RunTimeTicks.HasValue) + { + key += "-" + RunTimeTicks.Value.ToString(CultureInfo.InvariantCulture); + } + return key; } |
