2013-10-31 14:03:23 +00:00
|
|
|
|
using MediaBrowser.Common.Configuration;
|
2013-05-25 04:26:22 +00:00
|
|
|
|
using MediaBrowser.Common.Net;
|
2013-03-04 15:13:03 +00:00
|
|
|
|
using MediaBrowser.Controller.Configuration;
|
2013-03-04 14:34:00 +00:00
|
|
|
|
using MediaBrowser.Controller.Entities;
|
2013-05-02 14:30:38 +00:00
|
|
|
|
using MediaBrowser.Controller.Entities.Audio;
|
2013-06-09 16:47:28 +00:00
|
|
|
|
using MediaBrowser.Controller.Providers;
|
2014-01-31 04:50:09 +00:00
|
|
|
|
using MediaBrowser.Model.Dto;
|
2013-03-04 14:34:00 +00:00
|
|
|
|
using MediaBrowser.Model.Entities;
|
2013-11-05 22:29:07 +00:00
|
|
|
|
using MediaBrowser.Model.Providers;
|
2015-06-04 20:27:46 +00:00
|
|
|
|
using MediaBrowser.Providers.TV;
|
2013-03-04 14:34:00 +00:00
|
|
|
|
using System;
|
2013-11-05 22:29:07 +00:00
|
|
|
|
using System.Collections.Generic;
|
2013-05-12 22:57:51 +00:00
|
|
|
|
using System.Globalization;
|
2013-05-25 15:16:50 +00:00
|
|
|
|
using System.IO;
|
|
|
|
|
using System.Linq;
|
2015-10-29 15:47:05 +00:00
|
|
|
|
using System.Net;
|
2016-06-05 19:04:46 +00:00
|
|
|
|
using System.Text.RegularExpressions;
|
2013-03-04 14:34:00 +00:00
|
|
|
|
using System.Threading;
|
|
|
|
|
using System.Threading.Tasks;
|
2017-05-26 06:48:54 +00:00
|
|
|
|
|
2016-10-25 19:02:04 +00:00
|
|
|
|
using MediaBrowser.Controller.IO;
|
|
|
|
|
using MediaBrowser.Model.IO;
|
2015-10-29 15:47:05 +00:00
|
|
|
|
using MediaBrowser.Model.Net;
|
|
|
|
|
using MediaBrowser.Model.Serialization;
|
2013-03-04 14:34:00 +00:00
|
|
|
|
|
2013-06-09 16:47:28 +00:00
|
|
|
|
namespace MediaBrowser.Providers.Music
|
2013-03-04 14:34:00 +00:00
|
|
|
|
{
|
2016-05-25 00:42:12 +00:00
|
|
|
|
public class FanartArtistProvider : IRemoteImageProvider, IHasOrder
|
2013-03-04 14:34:00 +00:00
|
|
|
|
{
|
2014-01-31 04:50:09 +00:00
|
|
|
|
internal const string ApiKey = "5c6b04c68e904cfed1e6cbc9a9e683d4";
|
2016-04-21 05:13:33 +00:00
|
|
|
|
private const string FanArtBaseUrl = "https://webservice.fanart.tv/v3.1/music/{1}?api_key={0}";
|
2013-03-08 05:08:27 +00:00
|
|
|
|
|
2014-01-31 04:50:09 +00:00
|
|
|
|
private readonly CultureInfo _usCulture = new CultureInfo("en-US");
|
|
|
|
|
private readonly IServerConfigurationManager _config;
|
|
|
|
|
private readonly IHttpClient _httpClient;
|
2013-10-31 14:03:23 +00:00
|
|
|
|
private readonly IFileSystem _fileSystem;
|
2015-10-29 15:47:05 +00:00
|
|
|
|
private readonly IJsonSerializer _jsonSerializer;
|
2013-05-25 15:16:50 +00:00
|
|
|
|
|
2014-01-31 04:50:09 +00:00
|
|
|
|
internal static FanartArtistProvider Current;
|
|
|
|
|
|
2015-10-29 15:47:05 +00:00
|
|
|
|
public FanartArtistProvider(IServerConfigurationManager config, IHttpClient httpClient, IFileSystem fileSystem, IJsonSerializer jsonSerializer)
|
2013-03-04 14:34:00 +00:00
|
|
|
|
{
|
2014-01-31 04:50:09 +00:00
|
|
|
|
_config = config;
|
|
|
|
|
_httpClient = httpClient;
|
2013-10-31 14:03:23 +00:00
|
|
|
|
_fileSystem = fileSystem;
|
2015-10-29 15:47:05 +00:00
|
|
|
|
_jsonSerializer = jsonSerializer;
|
2013-05-25 15:16:50 +00:00
|
|
|
|
|
|
|
|
|
Current = this;
|
2013-03-04 14:34:00 +00:00
|
|
|
|
}
|
|
|
|
|
|
2014-01-31 04:50:09 +00:00
|
|
|
|
public string Name
|
|
|
|
|
{
|
|
|
|
|
get { return ProviderName; }
|
|
|
|
|
}
|
2013-03-04 14:34:00 +00:00
|
|
|
|
|
2014-01-31 04:50:09 +00:00
|
|
|
|
public static string ProviderName
|
2013-06-25 01:22:21 +00:00
|
|
|
|
{
|
2014-01-31 04:50:09 +00:00
|
|
|
|
get { return "FanArt"; }
|
2013-06-25 01:22:21 +00:00
|
|
|
|
}
|
2014-01-31 04:50:09 +00:00
|
|
|
|
|
2017-08-07 21:06:13 +00:00
|
|
|
|
public bool Supports(IHasMetadata item)
|
2013-03-04 14:34:00 +00:00
|
|
|
|
{
|
2013-05-02 14:30:38 +00:00
|
|
|
|
return item is MusicArtist;
|
2013-03-04 14:34:00 +00:00
|
|
|
|
}
|
|
|
|
|
|
2017-08-07 21:06:13 +00:00
|
|
|
|
public IEnumerable<ImageType> GetSupportedImages(IHasMetadata item)
|
2013-05-02 22:32:15 +00:00
|
|
|
|
{
|
2014-01-31 04:50:09 +00:00
|
|
|
|
return new List<ImageType>
|
2013-05-02 22:32:15 +00:00
|
|
|
|
{
|
2014-01-31 04:50:09 +00:00
|
|
|
|
ImageType.Primary,
|
|
|
|
|
ImageType.Logo,
|
|
|
|
|
ImageType.Art,
|
|
|
|
|
ImageType.Banner,
|
|
|
|
|
ImageType.Backdrop
|
|
|
|
|
};
|
|
|
|
|
}
|
|
|
|
|
|
2017-08-07 21:06:13 +00:00
|
|
|
|
public async Task<IEnumerable<RemoteImageInfo>> GetImages(IHasMetadata item, CancellationToken cancellationToken)
|
2014-01-31 04:50:09 +00:00
|
|
|
|
{
|
|
|
|
|
var artist = (MusicArtist)item;
|
|
|
|
|
|
|
|
|
|
var list = new List<RemoteImageInfo>();
|
|
|
|
|
|
2014-02-07 22:40:03 +00:00
|
|
|
|
var artistMusicBrainzId = artist.GetProviderId(MetadataProviders.MusicBrainzArtist);
|
2014-01-31 04:50:09 +00:00
|
|
|
|
|
|
|
|
|
if (!String.IsNullOrEmpty(artistMusicBrainzId))
|
|
|
|
|
{
|
2015-10-29 15:47:05 +00:00
|
|
|
|
await EnsureArtistJson(artistMusicBrainzId, cancellationToken).ConfigureAwait(false);
|
2014-01-31 04:50:09 +00:00
|
|
|
|
|
2015-10-29 15:47:05 +00:00
|
|
|
|
var artistJsonPath = GetArtistJsonPath(_config.CommonApplicationPaths, artistMusicBrainzId);
|
2014-01-31 04:50:09 +00:00
|
|
|
|
|
|
|
|
|
try
|
|
|
|
|
{
|
2015-10-29 15:47:05 +00:00
|
|
|
|
AddImages(list, artistJsonPath, cancellationToken);
|
2014-01-31 04:50:09 +00:00
|
|
|
|
}
|
|
|
|
|
catch (FileNotFoundException)
|
|
|
|
|
{
|
|
|
|
|
|
2014-12-23 03:58:14 +00:00
|
|
|
|
}
|
2016-10-27 18:37:46 +00:00
|
|
|
|
catch (IOException)
|
2014-12-23 03:58:14 +00:00
|
|
|
|
{
|
|
|
|
|
|
2014-01-31 04:50:09 +00:00
|
|
|
|
}
|
2013-05-02 22:32:15 +00:00
|
|
|
|
}
|
2014-01-31 04:50:09 +00:00
|
|
|
|
|
|
|
|
|
var language = item.GetPreferredMetadataLanguage();
|
|
|
|
|
|
|
|
|
|
var isLanguageEn = String.Equals(language, "en", StringComparison.OrdinalIgnoreCase);
|
|
|
|
|
|
|
|
|
|
// Sort first by width to prioritize HD versions
|
|
|
|
|
return list.OrderByDescending(i => i.Width ?? 0)
|
|
|
|
|
.ThenByDescending(i =>
|
|
|
|
|
{
|
|
|
|
|
if (String.Equals(language, i.Language, StringComparison.OrdinalIgnoreCase))
|
|
|
|
|
{
|
|
|
|
|
return 3;
|
|
|
|
|
}
|
|
|
|
|
if (!isLanguageEn)
|
|
|
|
|
{
|
|
|
|
|
if (String.Equals("en", i.Language, StringComparison.OrdinalIgnoreCase))
|
|
|
|
|
{
|
|
|
|
|
return 2;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
if (String.IsNullOrEmpty(i.Language))
|
|
|
|
|
{
|
|
|
|
|
return isLanguageEn ? 3 : 2;
|
|
|
|
|
}
|
|
|
|
|
return 0;
|
|
|
|
|
})
|
|
|
|
|
.ThenByDescending(i => i.CommunityRating ?? 0)
|
|
|
|
|
.ThenByDescending(i => i.VoteCount ?? 0);
|
2013-05-02 22:32:15 +00:00
|
|
|
|
}
|
|
|
|
|
|
2013-05-25 15:16:50 +00:00
|
|
|
|
/// <summary>
|
2014-01-31 04:50:09 +00:00
|
|
|
|
/// Adds the images.
|
2013-05-25 15:16:50 +00:00
|
|
|
|
/// </summary>
|
2014-01-31 04:50:09 +00:00
|
|
|
|
/// <param name="list">The list.</param>
|
2015-10-29 15:47:05 +00:00
|
|
|
|
/// <param name="path">The path.</param>
|
2014-01-31 04:50:09 +00:00
|
|
|
|
/// <param name="cancellationToken">The cancellation token.</param>
|
2015-10-29 15:47:05 +00:00
|
|
|
|
private void AddImages(List<RemoteImageInfo> list, string path, CancellationToken cancellationToken)
|
2013-05-02 22:32:15 +00:00
|
|
|
|
{
|
2015-10-29 15:47:05 +00:00
|
|
|
|
var obj = _jsonSerializer.DeserializeFromFile<FanartArtistResponse>(path);
|
|
|
|
|
|
|
|
|
|
PopulateImages(list, obj.artistbackground, ImageType.Backdrop, 1920, 1080);
|
2015-10-31 18:52:52 +00:00
|
|
|
|
PopulateImages(list, obj.artistthumb, ImageType.Primary, 500, 281);
|
2015-10-29 15:47:05 +00:00
|
|
|
|
PopulateImages(list, obj.hdmusiclogo, ImageType.Logo, 800, 310);
|
|
|
|
|
PopulateImages(list, obj.musicbanner, ImageType.Banner, 1000, 185);
|
|
|
|
|
PopulateImages(list, obj.musiclogo, ImageType.Logo, 400, 155);
|
|
|
|
|
PopulateImages(list, obj.hdmusicarts, ImageType.Art, 1000, 562);
|
|
|
|
|
PopulateImages(list, obj.musicarts, ImageType.Art, 500, 281);
|
2013-05-02 22:32:15 +00:00
|
|
|
|
}
|
|
|
|
|
|
2016-06-05 19:04:46 +00:00
|
|
|
|
private Regex _regex_http = new Regex("^http://");
|
2015-10-29 15:47:05 +00:00
|
|
|
|
private void PopulateImages(List<RemoteImageInfo> list,
|
|
|
|
|
List<FanartArtistImage> images,
|
|
|
|
|
ImageType type,
|
|
|
|
|
int width,
|
|
|
|
|
int height)
|
2013-09-06 15:23:20 +00:00
|
|
|
|
{
|
2015-10-29 15:47:05 +00:00
|
|
|
|
if (images == null)
|
2013-09-06 15:23:20 +00:00
|
|
|
|
{
|
2015-10-29 15:47:05 +00:00
|
|
|
|
return;
|
2013-09-06 15:23:20 +00:00
|
|
|
|
}
|
2014-01-31 04:50:09 +00:00
|
|
|
|
|
2015-10-29 15:47:05 +00:00
|
|
|
|
list.AddRange(images.Select(i =>
|
2013-04-28 23:39:17 +00:00
|
|
|
|
{
|
2015-10-29 15:47:05 +00:00
|
|
|
|
var url = i.url;
|
|
|
|
|
|
|
|
|
|
if (!string.IsNullOrEmpty(url))
|
2014-01-31 04:50:09 +00:00
|
|
|
|
{
|
2015-10-29 15:47:05 +00:00
|
|
|
|
var likesString = i.likes;
|
|
|
|
|
int likes;
|
|
|
|
|
|
|
|
|
|
var info = new RemoteImageInfo
|
2014-01-31 04:50:09 +00:00
|
|
|
|
{
|
2015-10-29 15:47:05 +00:00
|
|
|
|
RatingType = RatingType.Likes,
|
|
|
|
|
Type = type,
|
|
|
|
|
Width = width,
|
|
|
|
|
Height = height,
|
|
|
|
|
ProviderName = Name,
|
2016-06-05 19:04:46 +00:00
|
|
|
|
Url = _regex_http.Replace(url, "https://", 1),
|
2015-10-29 15:47:05 +00:00
|
|
|
|
Language = i.lang
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
if (!string.IsNullOrEmpty(likesString) && int.TryParse(likesString, NumberStyles.Any, _usCulture, out likes))
|
|
|
|
|
{
|
|
|
|
|
info.CommunityRating = likes;
|
2014-01-31 04:50:09 +00:00
|
|
|
|
}
|
2013-03-04 14:34:00 +00:00
|
|
|
|
|
2015-10-29 15:47:05 +00:00
|
|
|
|
return info;
|
2014-01-31 04:50:09 +00:00
|
|
|
|
}
|
2013-05-25 15:16:50 +00:00
|
|
|
|
|
2015-10-29 15:47:05 +00:00
|
|
|
|
return null;
|
|
|
|
|
}).Where(i => i != null));
|
2013-05-25 15:16:50 +00:00
|
|
|
|
}
|
|
|
|
|
|
2014-01-31 04:50:09 +00:00
|
|
|
|
public int Order
|
2013-05-25 04:26:22 +00:00
|
|
|
|
{
|
2014-01-31 04:50:09 +00:00
|
|
|
|
get { return 0; }
|
2013-05-25 04:26:22 +00:00
|
|
|
|
}
|
|
|
|
|
|
2014-01-31 04:50:09 +00:00
|
|
|
|
public Task<HttpResponseInfo> GetImageResponse(string url, CancellationToken cancellationToken)
|
2013-05-25 04:26:22 +00:00
|
|
|
|
{
|
2014-01-31 04:50:09 +00:00
|
|
|
|
return _httpClient.GetResponse(new HttpRequestOptions
|
|
|
|
|
{
|
|
|
|
|
CancellationToken = cancellationToken,
|
2016-10-29 23:49:23 +00:00
|
|
|
|
Url = url
|
2014-01-31 04:50:09 +00:00
|
|
|
|
});
|
2013-05-25 04:26:22 +00:00
|
|
|
|
}
|
2013-05-25 15:16:50 +00:00
|
|
|
|
|
2014-02-03 17:44:13 +00:00
|
|
|
|
private readonly Task _cachedTask = Task.FromResult(true);
|
2015-10-29 15:47:05 +00:00
|
|
|
|
internal Task EnsureArtistJson(string musicBrainzId, CancellationToken cancellationToken)
|
2014-01-31 04:50:09 +00:00
|
|
|
|
{
|
2015-10-29 15:47:05 +00:00
|
|
|
|
var jsonPath = GetArtistJsonPath(_config.ApplicationPaths, musicBrainzId);
|
2014-01-31 04:50:09 +00:00
|
|
|
|
|
2015-10-29 15:47:05 +00:00
|
|
|
|
var fileInfo = _fileSystem.GetFileSystemInfo(jsonPath);
|
2014-01-31 04:50:09 +00:00
|
|
|
|
|
|
|
|
|
if (fileInfo.Exists)
|
2013-05-25 15:16:50 +00:00
|
|
|
|
{
|
2014-02-19 18:50:37 +00:00
|
|
|
|
if ((DateTime.UtcNow - _fileSystem.GetLastWriteTimeUtc(fileInfo)).TotalDays <= 7)
|
2014-01-31 04:50:09 +00:00
|
|
|
|
{
|
2014-02-03 17:44:13 +00:00
|
|
|
|
return _cachedTask;
|
2014-01-31 04:50:09 +00:00
|
|
|
|
}
|
2013-05-25 15:16:50 +00:00
|
|
|
|
}
|
|
|
|
|
|
2015-10-29 15:47:05 +00:00
|
|
|
|
return DownloadArtistJson(musicBrainzId, cancellationToken);
|
2013-05-25 15:16:50 +00:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
2015-10-29 15:47:05 +00:00
|
|
|
|
/// Downloads the artist data.
|
2013-05-25 15:16:50 +00:00
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="musicBrainzId">The music brainz id.</param>
|
|
|
|
|
/// <param name="cancellationToken">The cancellation token.</param>
|
|
|
|
|
/// <returns>Task{System.Boolean}.</returns>
|
2015-10-29 15:47:05 +00:00
|
|
|
|
internal async Task DownloadArtistJson(string musicBrainzId, CancellationToken cancellationToken)
|
2013-05-25 15:16:50 +00:00
|
|
|
|
{
|
|
|
|
|
cancellationToken.ThrowIfCancellationRequested();
|
|
|
|
|
|
|
|
|
|
var url = string.Format(FanArtBaseUrl, ApiKey, musicBrainzId);
|
|
|
|
|
|
2015-01-18 05:45:10 +00:00
|
|
|
|
var clientKey = FanartSeriesProvider.Current.GetFanartOptions().UserApiKey;
|
|
|
|
|
if (!string.IsNullOrWhiteSpace(clientKey))
|
2015-01-12 07:01:19 +00:00
|
|
|
|
{
|
2015-01-18 05:45:10 +00:00
|
|
|
|
url += "&client_key=" + clientKey;
|
2015-01-12 07:01:19 +00:00
|
|
|
|
}
|
|
|
|
|
|
2015-10-29 15:47:05 +00:00
|
|
|
|
var jsonPath = GetArtistJsonPath(_config.ApplicationPaths, musicBrainzId);
|
2014-01-31 04:50:09 +00:00
|
|
|
|
|
2017-05-04 18:14:45 +00:00
|
|
|
|
_fileSystem.CreateDirectory(_fileSystem.GetDirectoryName(jsonPath));
|
2013-05-25 15:16:50 +00:00
|
|
|
|
|
2015-10-29 15:47:05 +00:00
|
|
|
|
try
|
2013-04-13 18:02:30 +00:00
|
|
|
|
{
|
2015-10-29 15:47:05 +00:00
|
|
|
|
using (var response = await _httpClient.Get(new HttpRequestOptions
|
|
|
|
|
{
|
|
|
|
|
Url = url,
|
2016-10-31 18:39:41 +00:00
|
|
|
|
CancellationToken = cancellationToken,
|
|
|
|
|
BufferContent = true
|
2013-05-06 19:31:57 +00:00
|
|
|
|
|
2015-10-29 15:47:05 +00:00
|
|
|
|
}).ConfigureAwait(false))
|
|
|
|
|
{
|
2016-10-25 19:02:04 +00:00
|
|
|
|
using (var saveFileStream = _fileSystem.GetFileStream(jsonPath, FileOpenMode.Create, FileAccessMode.Write, FileShareMode.Read, true))
|
2015-10-29 15:47:05 +00:00
|
|
|
|
{
|
|
|
|
|
await response.CopyToAsync(saveFileStream).ConfigureAwait(false);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
catch (HttpException ex)
|
2013-04-28 23:39:17 +00:00
|
|
|
|
{
|
2015-10-29 15:47:05 +00:00
|
|
|
|
if (ex.StatusCode.HasValue && ex.StatusCode.Value == HttpStatusCode.NotFound)
|
2013-05-25 04:26:22 +00:00
|
|
|
|
{
|
2015-10-29 15:47:05 +00:00
|
|
|
|
_jsonSerializer.SerializeToFile(new FanartArtistResponse(), jsonPath);
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
throw;
|
2013-05-25 04:26:22 +00:00
|
|
|
|
}
|
2013-04-28 23:39:17 +00:00
|
|
|
|
}
|
2013-05-25 15:16:50 +00:00
|
|
|
|
}
|
2013-06-19 13:54:45 +00:00
|
|
|
|
|
2013-05-25 15:16:50 +00:00
|
|
|
|
/// <summary>
|
2014-01-31 04:50:09 +00:00
|
|
|
|
/// Gets the artist data path.
|
2013-05-25 15:16:50 +00:00
|
|
|
|
/// </summary>
|
2014-01-31 04:50:09 +00:00
|
|
|
|
/// <param name="appPaths">The application paths.</param>
|
|
|
|
|
/// <param name="musicBrainzArtistId">The music brainz artist identifier.</param>
|
|
|
|
|
/// <returns>System.String.</returns>
|
|
|
|
|
private static string GetArtistDataPath(IApplicationPaths appPaths, string musicBrainzArtistId)
|
2013-05-25 15:16:50 +00:00
|
|
|
|
{
|
2014-01-31 04:50:09 +00:00
|
|
|
|
var dataPath = Path.Combine(GetArtistDataPath(appPaths), musicBrainzArtistId);
|
2013-03-04 14:34:00 +00:00
|
|
|
|
|
2014-01-31 04:50:09 +00:00
|
|
|
|
return dataPath;
|
|
|
|
|
}
|
2013-12-15 18:33:07 +00:00
|
|
|
|
|
2014-01-31 04:50:09 +00:00
|
|
|
|
/// <summary>
|
|
|
|
|
/// Gets the artist data path.
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="appPaths">The application paths.</param>
|
|
|
|
|
/// <returns>System.String.</returns>
|
|
|
|
|
internal static string GetArtistDataPath(IApplicationPaths appPaths)
|
|
|
|
|
{
|
2014-03-01 04:13:44 +00:00
|
|
|
|
var dataPath = Path.Combine(appPaths.CachePath, "fanart-music");
|
2013-11-05 22:29:07 +00:00
|
|
|
|
|
2014-01-31 04:50:09 +00:00
|
|
|
|
return dataPath;
|
2013-03-04 14:34:00 +00:00
|
|
|
|
}
|
2013-11-30 06:08:14 +00:00
|
|
|
|
|
2015-10-29 15:47:05 +00:00
|
|
|
|
internal static string GetArtistJsonPath(IApplicationPaths appPaths, string musicBrainzArtistId)
|
2013-11-30 06:08:14 +00:00
|
|
|
|
{
|
2014-01-31 04:50:09 +00:00
|
|
|
|
var dataPath = GetArtistDataPath(appPaths, musicBrainzArtistId);
|
|
|
|
|
|
2015-10-29 15:47:05 +00:00
|
|
|
|
return Path.Combine(dataPath, "fanart.json");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public class FanartArtistImage
|
|
|
|
|
{
|
|
|
|
|
public string id { get; set; }
|
|
|
|
|
public string url { get; set; }
|
|
|
|
|
public string likes { get; set; }
|
|
|
|
|
public string disc { get; set; }
|
|
|
|
|
public string size { get; set; }
|
|
|
|
|
public string lang { get; set; }
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public class Album
|
|
|
|
|
{
|
|
|
|
|
public string release_group_id { get; set; }
|
|
|
|
|
public List<FanartArtistImage> cdart { get; set; }
|
|
|
|
|
public List<FanartArtistImage> albumcover { get; set; }
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public class FanartArtistResponse
|
|
|
|
|
{
|
|
|
|
|
public string name { get; set; }
|
|
|
|
|
public string mbid_id { get; set; }
|
|
|
|
|
public List<FanartArtistImage> artistthumb { get; set; }
|
|
|
|
|
public List<FanartArtistImage> artistbackground { get; set; }
|
|
|
|
|
public List<FanartArtistImage> hdmusiclogo { get; set; }
|
|
|
|
|
public List<FanartArtistImage> musicbanner { get; set; }
|
|
|
|
|
public List<FanartArtistImage> musiclogo { get; set; }
|
|
|
|
|
public List<FanartArtistImage> musicarts { get; set; }
|
|
|
|
|
public List<FanartArtistImage> hdmusicarts { get; set; }
|
|
|
|
|
public List<Album> albums { get; set; }
|
2013-11-30 06:08:14 +00:00
|
|
|
|
}
|
2013-03-04 14:34:00 +00:00
|
|
|
|
}
|
|
|
|
|
}
|