ExternalIdInfo.cs 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. namespace MediaBrowser.Model.Providers
  2. {
  3. /// <summary>
  4. /// Represents the external id information for serialization to the client.
  5. /// </summary>
  6. public class ExternalIdInfo
  7. {
  8. /// <summary>
  9. /// Initializes a new instance of the <see cref="ExternalIdInfo"/> class.
  10. /// </summary>
  11. /// <param name="name">Name of the external id provider (IE: IMDB, MusicBrainz, etc).</param>
  12. /// <param name="key">Key for this id. This key should be unique across all providers.</param>
  13. /// <param name="type">Specific media type for this id.</param>
  14. public ExternalIdInfo(string name, string key, ExternalIdMediaType? type)
  15. {
  16. Name = name;
  17. Key = key;
  18. Type = type;
  19. }
  20. /// <summary>
  21. /// Gets or sets the display name of the external id provider (IE: IMDB, MusicBrainz, etc).
  22. /// </summary>
  23. // TODO: This should be renamed to ProviderName
  24. public string Name { get; set; }
  25. /// <summary>
  26. /// Gets or sets the unique key for this id. This key should be unique across all providers.
  27. /// </summary>
  28. // TODO: This property is not actually unique across the concrete types at the moment. It should be updated to be unique.
  29. public string Key { get; set; }
  30. /// <summary>
  31. /// Gets or sets the specific media type for this id. This is used to distinguish between the different
  32. /// external id types for providers with multiple ids.
  33. /// A null value indicates there is no specific media type associated with the external id, or this is the
  34. /// default id for the external provider so there is no need to specify a type.
  35. /// </summary>
  36. /// <remarks>
  37. /// This can be used along with the <see cref="Name"/> to localize the external id on the client.
  38. /// </remarks>
  39. public ExternalIdMediaType? Type { get; set; }
  40. }
  41. }