mirror of
https://github.com/Readarr/Readarr.git
synced 2026-04-25 22:36:59 -04:00
Added MusicBrainz API project
This commit is contained in:
@@ -0,0 +1,39 @@
|
||||
using System;
|
||||
using System.Xml.Serialization;
|
||||
|
||||
namespace Hqub.MusicBrainz.API.Entities
|
||||
{
|
||||
[XmlRoot("cover-art-archive", Namespace = "http://musicbrainz.org/ns/mmd-2.0#")]
|
||||
public class CoverArtArchive
|
||||
{
|
||||
/// <summary>
|
||||
/// Gets or sets a value indicating whether artwork is available or not.
|
||||
/// </summary>
|
||||
[XmlElement("artwork")]
|
||||
public bool Artwork { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the count.
|
||||
/// </summary>
|
||||
[XmlElement("count")]
|
||||
public int Count { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets a value indicating whether a front crover is available or not.
|
||||
/// </summary>
|
||||
[XmlElement("front")]
|
||||
public bool Front { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets a value indicating whether a back crover is available or not.
|
||||
/// </summary>
|
||||
[XmlElement("back")]
|
||||
public bool Back { get; set; }
|
||||
|
||||
public static Uri GetCoverArtUri(string releaseId)
|
||||
{
|
||||
string url = "http://coverartarchive.org/release/" + releaseId + "/front-250.jpg";
|
||||
return new Uri(url, UriKind.RelativeOrAbsolute);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user