ExternalIds.cs 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. using MediaBrowser.Controller.Entities.Audio;
  2. using MediaBrowser.Controller.Providers;
  3. using MediaBrowser.Model.Entities;
  4. namespace MediaBrowser.Providers.Plugins.AudioDb
  5. {
  6. public class AudioDbAlbumExternalId : IExternalId
  7. {
  8. /// <inheritdoc />
  9. public string Name => "TheAudioDb";
  10. /// <inheritdoc />
  11. public string Key => MetadataProvider.AudioDbAlbum.ToString();
  12. /// <inheritdoc />
  13. public string UrlFormatString => "https://www.theaudiodb.com/album/{0}";
  14. /// <inheritdoc />
  15. public bool Supports(IHasProviderIds item) => item is MusicAlbum;
  16. }
  17. public class AudioDbOtherAlbumExternalId : IExternalId
  18. {
  19. /// <inheritdoc />
  20. public string Name => "TheAudioDb Album";
  21. /// <inheritdoc />
  22. public string Key => MetadataProvider.AudioDbAlbum.ToString();
  23. /// <inheritdoc />
  24. public string UrlFormatString => "https://www.theaudiodb.com/album/{0}";
  25. /// <inheritdoc />
  26. public bool Supports(IHasProviderIds item) => item is Audio;
  27. }
  28. public class AudioDbArtistExternalId : IExternalId
  29. {
  30. /// <inheritdoc />
  31. public string Name => "TheAudioDb";
  32. /// <inheritdoc />
  33. public string Key => MetadataProvider.AudioDbArtist.ToString();
  34. /// <inheritdoc />
  35. public string UrlFormatString => "https://www.theaudiodb.com/artist/{0}";
  36. /// <inheritdoc />
  37. public bool Supports(IHasProviderIds item) => item is MusicArtist;
  38. }
  39. public class AudioDbOtherArtistExternalId : IExternalId
  40. {
  41. /// <inheritdoc />
  42. public string Name => "TheAudioDb Artist";
  43. /// <inheritdoc />
  44. public string Key => MetadataProvider.AudioDbArtist.ToString();
  45. /// <inheritdoc />
  46. public string UrlFormatString => "https://www.theaudiodb.com/artist/{0}";
  47. /// <inheritdoc />
  48. public bool Supports(IHasProviderIds item) => item is Audio || item is MusicAlbum;
  49. }
  50. }