IExternalId.cs 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. using System;
  2. using MediaBrowser.Model.Entities;
  3. using MediaBrowser.Model.Providers;
  4. namespace MediaBrowser.Controller.Providers
  5. {
  6. /// <summary>
  7. /// Represents an identifier for an external provider.
  8. /// </summary>
  9. public interface IExternalId
  10. {
  11. /// <summary>
  12. /// Gets the display name of the provider associated with this ID type.
  13. /// </summary>
  14. string ProviderName { get; }
  15. /// <summary>
  16. /// Gets the unique key to distinguish this provider/type pair. This should be unique across providers.
  17. /// </summary>
  18. // TODO: This property is not actually unique across the concrete types at the moment. It should be updated to be unique.
  19. string Key { get; }
  20. /// <summary>
  21. /// Gets the specific media type for this id. This is used to distinguish between the different
  22. /// external id types for providers with multiple ids.
  23. /// A null value indicates there is no specific media type associated with the external id, or this is the
  24. /// default id for the external provider so there is no need to specify a type.
  25. /// </summary>
  26. /// <remarks>
  27. /// This can be used along with the <see cref="ProviderName"/> to localize the external id on the client.
  28. /// </remarks>
  29. ExternalIdMediaType? Type { get; }
  30. /// <summary>
  31. /// Determines whether this id supports a given item type.
  32. /// </summary>
  33. /// <param name="item">The item.</param>
  34. /// <returns>True if this item is supported, otherwise false.</returns>
  35. bool Supports(IHasProviderIds item);
  36. }
  37. }