2019-01-13 20:03:10 +00:00
|
|
|
using MediaBrowser.Controller.Entities.Audio;
|
2014-02-21 18:48:15 +00:00
|
|
|
using MediaBrowser.Controller.Providers;
|
|
|
|
using MediaBrowser.Model.Entities;
|
2020-05-17 19:57:24 +00:00
|
|
|
using MediaBrowser.Model.Providers;
|
2014-02-21 18:48:15 +00:00
|
|
|
|
2020-03-02 17:07:31 +00:00
|
|
|
namespace MediaBrowser.Providers.Plugins.AudioDb
|
2014-02-21 18:48:15 +00:00
|
|
|
{
|
|
|
|
public class AudioDbAlbumExternalId : IExternalId
|
|
|
|
{
|
2019-09-10 20:37:53 +00:00
|
|
|
/// <inheritdoc />
|
2020-05-17 21:35:43 +00:00
|
|
|
public string ProviderName => "TheAudioDb";
|
2014-02-21 18:48:15 +00:00
|
|
|
|
2019-09-10 20:37:53 +00:00
|
|
|
/// <inheritdoc />
|
2019-01-13 20:31:14 +00:00
|
|
|
public string Key => MetadataProviders.AudioDbAlbum.ToString();
|
2014-02-21 18:48:15 +00:00
|
|
|
|
2020-03-22 19:58:53 +00:00
|
|
|
/// <inheritdoc />
|
2020-05-17 19:29:53 +00:00
|
|
|
public ExternalIdMediaType Type => ExternalIdMediaType.General;
|
2020-03-22 19:58:53 +00:00
|
|
|
|
2019-09-10 20:37:53 +00:00
|
|
|
/// <inheritdoc />
|
2019-01-13 20:31:14 +00:00
|
|
|
public string UrlFormatString => "https://www.theaudiodb.com/album/{0}";
|
2014-02-21 18:48:15 +00:00
|
|
|
|
2019-09-10 20:37:53 +00:00
|
|
|
/// <inheritdoc />
|
2020-03-02 17:07:31 +00:00
|
|
|
public bool Supports(IHasProviderIds item) => item is MusicAlbum;
|
2014-02-21 18:48:15 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
public class AudioDbOtherAlbumExternalId : IExternalId
|
|
|
|
{
|
2019-09-10 20:37:53 +00:00
|
|
|
/// <inheritdoc />
|
2020-05-17 21:35:43 +00:00
|
|
|
public string ProviderName => "TheAudioDb";
|
2014-02-21 18:48:15 +00:00
|
|
|
|
2019-09-10 20:37:53 +00:00
|
|
|
/// <inheritdoc />
|
2019-01-13 20:31:14 +00:00
|
|
|
public string Key => MetadataProviders.AudioDbAlbum.ToString();
|
2014-02-21 18:48:15 +00:00
|
|
|
|
2020-03-22 19:58:53 +00:00
|
|
|
/// <inheritdoc />
|
2020-03-26 21:26:12 +00:00
|
|
|
public ExternalIdMediaType Type => ExternalIdMediaType.Album;
|
2020-03-22 19:58:53 +00:00
|
|
|
|
2019-09-10 20:37:53 +00:00
|
|
|
/// <inheritdoc />
|
2019-01-13 20:31:14 +00:00
|
|
|
public string UrlFormatString => "https://www.theaudiodb.com/album/{0}";
|
2014-02-21 18:48:15 +00:00
|
|
|
|
2019-09-10 20:37:53 +00:00
|
|
|
/// <inheritdoc />
|
|
|
|
public bool Supports(IHasProviderIds item) => item is Audio;
|
2014-02-21 18:48:15 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
public class AudioDbArtistExternalId : IExternalId
|
|
|
|
{
|
2019-09-10 20:37:53 +00:00
|
|
|
/// <inheritdoc />
|
2020-05-17 21:35:43 +00:00
|
|
|
public string ProviderName => "TheAudioDb";
|
2014-02-21 18:48:15 +00:00
|
|
|
|
2019-09-10 20:37:53 +00:00
|
|
|
/// <inheritdoc />
|
2019-01-13 20:31:14 +00:00
|
|
|
public string Key => MetadataProviders.AudioDbArtist.ToString();
|
2014-02-21 18:48:15 +00:00
|
|
|
|
2020-03-22 19:58:53 +00:00
|
|
|
/// <inheritdoc />
|
2020-03-26 21:26:12 +00:00
|
|
|
public ExternalIdMediaType Type => ExternalIdMediaType.Artist;
|
2020-03-22 19:58:53 +00:00
|
|
|
|
2019-09-10 20:37:53 +00:00
|
|
|
/// <inheritdoc />
|
2019-01-13 20:31:14 +00:00
|
|
|
public string UrlFormatString => "https://www.theaudiodb.com/artist/{0}";
|
2014-02-21 18:48:15 +00:00
|
|
|
|
2019-09-10 20:37:53 +00:00
|
|
|
/// <inheritdoc />
|
|
|
|
public bool Supports(IHasProviderIds item) => item is MusicArtist;
|
2014-02-21 18:48:15 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
public class AudioDbOtherArtistExternalId : IExternalId
|
|
|
|
{
|
2019-09-10 20:37:53 +00:00
|
|
|
/// <inheritdoc />
|
2020-05-17 21:35:43 +00:00
|
|
|
public string ProviderName => "TheAudioDb";
|
2014-02-21 18:48:15 +00:00
|
|
|
|
2019-09-10 20:37:53 +00:00
|
|
|
/// <inheritdoc />
|
2019-01-13 20:31:14 +00:00
|
|
|
public string Key => MetadataProviders.AudioDbArtist.ToString();
|
2014-02-21 18:48:15 +00:00
|
|
|
|
2020-03-22 19:58:53 +00:00
|
|
|
/// <inheritdoc />
|
2020-03-26 21:26:12 +00:00
|
|
|
public ExternalIdMediaType Type => ExternalIdMediaType.OtherArtist;
|
2020-03-22 19:58:53 +00:00
|
|
|
|
2019-09-10 20:37:53 +00:00
|
|
|
/// <inheritdoc />
|
2019-01-13 20:31:14 +00:00
|
|
|
public string UrlFormatString => "https://www.theaudiodb.com/artist/{0}";
|
2014-02-21 18:48:15 +00:00
|
|
|
|
2019-09-10 20:37:53 +00:00
|
|
|
/// <inheritdoc />
|
2020-03-02 17:07:31 +00:00
|
|
|
public bool Supports(IHasProviderIds item) => item is Audio || item is MusicAlbum;
|
2014-02-21 18:48:15 +00:00
|
|
|
}
|
|
|
|
}
|