2020-06-19 20:24:13 +02:00
|
|
|
#pragma warning disable CS1591
|
|
|
|
|
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;
|
2020-05-17 21:57:24 +02:00
|
|
|
using MediaBrowser.Model.Providers;
|
2014-02-21 19:48:15 +01:00
|
|
|
|
2020-03-02 18:07:31 +01:00
|
|
|
namespace MediaBrowser.Providers.Plugins.AudioDb
|
2014-02-21 19:48:15 +01:00
|
|
|
{
|
|
|
|
public class AudioDbAlbumExternalId : IExternalId
|
|
|
|
{
|
2019-09-10 22:37:53 +02:00
|
|
|
/// <inheritdoc />
|
2020-05-17 23:35:43 +02:00
|
|
|
public string ProviderName => "TheAudioDb";
|
2014-02-21 19:48:15 +01:00
|
|
|
|
2019-09-10 22:37:53 +02:00
|
|
|
/// <inheritdoc />
|
2020-06-06 21:17:49 +02:00
|
|
|
public string Key => MetadataProvider.AudioDbAlbum.ToString();
|
2014-02-21 19:48:15 +01:00
|
|
|
|
2020-03-22 20:58:53 +01:00
|
|
|
/// <inheritdoc />
|
2020-05-23 22:08:51 +02:00
|
|
|
public ExternalIdMediaType? Type => null;
|
2020-03-22 20:58:53 +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 />
|
2020-03-02 18:07:31 +01:00
|
|
|
public bool Supports(IHasProviderIds item) => item is MusicAlbum;
|
2014-02-21 19:48:15 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
public class AudioDbOtherAlbumExternalId : IExternalId
|
|
|
|
{
|
2019-09-10 22:37:53 +02:00
|
|
|
/// <inheritdoc />
|
2020-05-17 23:35:43 +02:00
|
|
|
public string ProviderName => "TheAudioDb";
|
2014-02-21 19:48:15 +01:00
|
|
|
|
2019-09-10 22:37:53 +02:00
|
|
|
/// <inheritdoc />
|
2020-06-06 21:17:49 +02:00
|
|
|
public string Key => MetadataProvider.AudioDbAlbum.ToString();
|
2014-02-21 19:48:15 +01:00
|
|
|
|
2020-03-22 20:58:53 +01:00
|
|
|
/// <inheritdoc />
|
2020-05-23 22:08:51 +02:00
|
|
|
public ExternalIdMediaType? Type => ExternalIdMediaType.Album;
|
2020-03-22 20:58:53 +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 />
|
2020-05-17 23:35:43 +02:00
|
|
|
public string ProviderName => "TheAudioDb";
|
2014-02-21 19:48:15 +01:00
|
|
|
|
2019-09-10 22:37:53 +02:00
|
|
|
/// <inheritdoc />
|
2020-06-06 21:17:49 +02:00
|
|
|
public string Key => MetadataProvider.AudioDbArtist.ToString();
|
2014-02-21 19:48:15 +01:00
|
|
|
|
2020-03-22 20:58:53 +01:00
|
|
|
/// <inheritdoc />
|
2020-05-23 22:08:51 +02:00
|
|
|
public ExternalIdMediaType? Type => ExternalIdMediaType.Artist;
|
2020-03-22 20:58:53 +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 />
|
2020-05-17 23:35:43 +02:00
|
|
|
public string ProviderName => "TheAudioDb";
|
2014-02-21 19:48:15 +01:00
|
|
|
|
2019-09-10 22:37:53 +02:00
|
|
|
/// <inheritdoc />
|
2020-06-06 21:17:49 +02:00
|
|
|
public string Key => MetadataProvider.AudioDbArtist.ToString();
|
2014-02-21 19:48:15 +01:00
|
|
|
|
2020-03-22 20:58:53 +01:00
|
|
|
/// <inheritdoc />
|
2020-05-23 22:08:51 +02:00
|
|
|
public ExternalIdMediaType? Type => ExternalIdMediaType.OtherArtist;
|
2020-03-22 20:58:53 +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 />
|
2020-03-02 18:07:31 +01:00
|
|
|
public bool Supports(IHasProviderIds item) => item is Audio || item is MusicAlbum;
|
2014-02-21 19:48:15 +01:00
|
|
|
}
|
|
|
|
}
|