ExternalIds.cs 2.0 KB

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