diff --git a/MediaBrowser.Controller/Entities/BaseItem.cs b/MediaBrowser.Controller/Entities/BaseItem.cs index 411190d77a..7587a8a5a0 100644 --- a/MediaBrowser.Controller/Entities/BaseItem.cs +++ b/MediaBrowser.Controller/Entities/BaseItem.cs @@ -69,7 +69,7 @@ namespace MediaBrowser.Controller.Entities /// /// The primary image path. [IgnoreDataMember] - public virtual string PrimaryImagePath + public string PrimaryImagePath { get { return GetImage(ImageType.Primary); } set { SetImage(ImageType.Primary, value); } @@ -79,7 +79,7 @@ namespace MediaBrowser.Controller.Entities /// Gets or sets the images. /// /// The images. - public Dictionary Images { get; set; } + public virtual Dictionary Images { get; set; } /// /// Gets or sets the date created. @@ -546,6 +546,12 @@ namespace MediaBrowser.Controller.Entities /// The studios. public virtual List Studios { get; set; } + /// + /// Gets or sets the publishers. + /// + /// The publishers. + public virtual List Publishers { get; set; } + /// /// Gets or sets the genres. /// @@ -996,7 +1002,7 @@ namespace MediaBrowser.Controller.Entities { if (string.IsNullOrWhiteSpace(name)) { - throw new ArgumentNullException(); + throw new ArgumentNullException("name"); } if (Studios == null) @@ -1010,6 +1016,47 @@ namespace MediaBrowser.Controller.Entities } } + /// + /// Adds the publishers. + /// + /// The publishers. + /// + public void AddPublishers(IEnumerable publishers) + { + if (publishers == null) + { + throw new ArgumentNullException(); + } + + foreach (var name in publishers) + { + AddPublisher(name); + } + } + + /// + /// Adds the publisher. + /// + /// The name. + /// name + public void AddPublisher(string name) + { + if (string.IsNullOrWhiteSpace(name)) + { + throw new ArgumentNullException("name"); + } + + if (Publishers == null) + { + Publishers = new List(); + } + + if (!Publishers.Contains(name, StringComparer.OrdinalIgnoreCase)) + { + Publishers.Add(name); + } + } + /// /// Adds a tagline to the item /// @@ -1019,7 +1066,7 @@ namespace MediaBrowser.Controller.Entities { if (string.IsNullOrWhiteSpace(name)) { - throw new ArgumentNullException(); + throw new ArgumentNullException("name"); } if (Taglines == null) @@ -1042,7 +1089,7 @@ namespace MediaBrowser.Controller.Entities { if (string.IsNullOrWhiteSpace(url)) { - throw new ArgumentNullException(); + throw new ArgumentNullException("url"); } if (TrailerUrls == null)