2019-01-13 21:03:10 +01:00
|
|
|
using MediaBrowser.Controller.Entities.Audio;
|
2014-02-21 19:48:15 +01:00
|
|
|
using MediaBrowser.Controller.Providers;
|
|
|
|
using MediaBrowser.Model.Entities;
|
|
|
|
|
|
|
|
namespace MediaBrowser.Providers.Music
|
|
|
|
{
|
|
|
|
public class AudioDbAlbumExternalId : IExternalId
|
|
|
|
{
|
2019-09-10 22:37:53 +02:00
|
|
|
/// <inheritdoc />
|
2019-01-13 21:31:14 +01:00
|
|
|
public string Name => "TheAudioDb";
|
2014-02-21 19:48:15 +01:00
|
|
|
|
2019-09-10 22:37:53 +02:00
|
|
|
/// <inheritdoc />
|
2019-01-13 21:31:14 +01:00
|
|
|
public string Key => MetadataProviders.AudioDbAlbum.ToString();
|
2014-02-21 19:48:15 +01:00
|
|
|
|
2019-09-10 22:37:53 +02:00
|
|
|
/// <inheritdoc />
|
2019-01-13 21:31:14 +01:00
|
|
|
public string UrlFormatString => "https://www.theaudiodb.com/album/{0}";
|
2014-02-21 19:48:15 +01:00
|
|
|
|
2019-09-10 22:37:53 +02:00
|
|
|
/// <inheritdoc />
|
2014-02-21 19:48:15 +01:00
|
|
|
public bool Supports(IHasProviderIds item)
|
2019-09-10 22:37:53 +02:00
|
|
|
=> item is MusicAlbum;
|
2014-02-21 19:48:15 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
public class AudioDbOtherAlbumExternalId : IExternalId
|
|
|
|
{
|
2019-09-10 22:37:53 +02:00
|
|
|
/// <inheritdoc />
|
2019-01-13 21:31:14 +01:00
|
|
|
public string Name => "TheAudioDb Album";
|
2014-02-21 19:48:15 +01:00
|
|
|
|
2019-09-10 22:37:53 +02:00
|
|
|
/// <inheritdoc />
|
2019-01-13 21:31:14 +01:00
|
|
|
public string Key => MetadataProviders.AudioDbAlbum.ToString();
|
2014-02-21 19:48:15 +01:00
|
|
|
|
2019-09-10 22:37:53 +02:00
|
|
|
/// <inheritdoc />
|
2019-01-13 21:31:14 +01:00
|
|
|
public string UrlFormatString => "https://www.theaudiodb.com/album/{0}";
|
2014-02-21 19:48:15 +01:00
|
|
|
|
2019-09-10 22:37:53 +02:00
|
|
|
/// <inheritdoc />
|
|
|
|
public bool Supports(IHasProviderIds item) => item is Audio;
|
2014-02-21 19:48:15 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
public class AudioDbArtistExternalId : IExternalId
|
|
|
|
{
|
2019-09-10 22:37:53 +02:00
|
|
|
/// <inheritdoc />
|
2019-01-13 21:31:14 +01:00
|
|
|
public string Name => "TheAudioDb";
|
2014-02-21 19:48:15 +01:00
|
|
|
|
2019-09-10 22:37:53 +02:00
|
|
|
/// <inheritdoc />
|
2019-01-13 21:31:14 +01:00
|
|
|
public string Key => MetadataProviders.AudioDbArtist.ToString();
|
2014-02-21 19:48:15 +01:00
|
|
|
|
2019-09-10 22:37:53 +02:00
|
|
|
/// <inheritdoc />
|
2019-01-13 21:31:14 +01:00
|
|
|
public string UrlFormatString => "https://www.theaudiodb.com/artist/{0}";
|
2014-02-21 19:48:15 +01:00
|
|
|
|
2019-09-10 22:37:53 +02:00
|
|
|
/// <inheritdoc />
|
|
|
|
public bool Supports(IHasProviderIds item) => item is MusicArtist;
|
2014-02-21 19:48:15 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
public class AudioDbOtherArtistExternalId : IExternalId
|
|
|
|
{
|
2019-09-10 22:37:53 +02:00
|
|
|
/// <inheritdoc />
|
2019-01-13 21:31:14 +01:00
|
|
|
public string Name => "TheAudioDb Artist";
|
2014-02-21 19:48:15 +01:00
|
|
|
|
2019-09-10 22:37:53 +02:00
|
|
|
/// <inheritdoc />
|
2019-01-13 21:31:14 +01:00
|
|
|
public string Key => MetadataProviders.AudioDbArtist.ToString();
|
2014-02-21 19:48:15 +01:00
|
|
|
|
2019-09-10 22:37:53 +02:00
|
|
|
/// <inheritdoc />
|
2019-01-13 21:31:14 +01:00
|
|
|
public string UrlFormatString => "https://www.theaudiodb.com/artist/{0}";
|
2014-02-21 19:48:15 +01:00
|
|
|
|
2019-09-10 22:37:53 +02:00
|
|
|
/// <inheritdoc />
|
2014-02-21 19:48:15 +01:00
|
|
|
public bool Supports(IHasProviderIds item)
|
2019-10-29 18:37:10 +01:00
|
|
|
=> item is Audio || item is MusicAlbum;
|
2014-02-21 19:48:15 +01:00
|
|
|
}
|
|
|
|
}
|