diff options
Diffstat (limited to 'MediaBrowser.Controller/Entities/Audio/Audio.cs')
| -rw-r--r-- | MediaBrowser.Controller/Entities/Audio/Audio.cs | 33 |
1 files changed, 31 insertions, 2 deletions
diff --git a/MediaBrowser.Controller/Entities/Audio/Audio.cs b/MediaBrowser.Controller/Entities/Audio/Audio.cs index d629ec4d7..9deb8241d 100644 --- a/MediaBrowser.Controller/Entities/Audio/Audio.cs +++ b/MediaBrowser.Controller/Entities/Audio/Audio.cs @@ -1,5 +1,7 @@ using MediaBrowser.Model.Entities; +using System; using System.Collections.Generic; +using System.Linq; using System.Runtime.Serialization; namespace MediaBrowser.Controller.Entities.Audio @@ -14,7 +16,7 @@ namespace MediaBrowser.Controller.Entities.Audio /// </summary> /// <value>The media streams.</value> public List<MediaStream> MediaStreams { get; set; } - + /// <summary> /// Override this to true if class should be grouped under a container in indicies /// The container class should be defined via IndexContainer @@ -51,7 +53,8 @@ namespace MediaBrowser.Controller.Entities.Audio /// Gets or sets the artist. /// </summary> /// <value>The artist.</value> - public string Artist { get; set; } + public List<string> Artists { get; set; } + /// <summary> /// Gets or sets the album. /// </summary> @@ -76,6 +79,32 @@ namespace MediaBrowser.Controller.Entities.Audio } /// <summary> + /// Initializes a new instance of the <see cref="Audio"/> class. + /// </summary> + public Audio() + { + Artists = new List<string>(); + } + + /// <summary> + /// Adds the artist. + /// </summary> + /// <param name="name">The name.</param> + /// <exception cref="System.ArgumentNullException">name</exception> + public void AddArtist(string name) + { + if (string.IsNullOrWhiteSpace(name)) + { + throw new ArgumentNullException("name"); + } + + if (!Artists.Contains(name, StringComparer.OrdinalIgnoreCase)) + { + Artists.Add(name); + } + } + + /// <summary> /// Creates the name of the sort. /// </summary> /// <returns>System.String.</returns> |
