New: Use Goodreads directly, allow multiple editions of a book (new DB required)

This commit is contained in:
ta264
2020-06-30 21:46:01 +01:00
parent d83d2548e5
commit 45d49117ca
178 changed files with 3332 additions and 1786 deletions
@@ -0,0 +1,85 @@
using Newtonsoft.Json;
namespace NzbDrone.Core.MetadataSource.Goodreads
{
public class SearchJsonResource
{
[JsonProperty("imageUrl")]
public string ImageUrl { get; set; }
[JsonProperty("bookId")]
public int BookId { get; set; }
[JsonProperty("workId")]
public int WorkId { get; set; }
[JsonProperty("bookUrl")]
public string BookUrl { get; set; }
[JsonProperty("from_search")]
public bool FromSearch { get; set; }
[JsonProperty("from_srp")]
public bool FromSrp { get; set; }
[JsonProperty("qid")]
public string Qid { get; set; }
[JsonProperty("rank")]
public int Rank { get; set; }
[JsonProperty("title")]
public string Title { get; set; }
[JsonProperty("bookTitleBare")]
public string BookTitleBare { get; set; }
[JsonProperty("numPages")]
public int PageCount { get; set; }
[JsonProperty("avgRating")]
public decimal AverageRating { get; set; }
[JsonProperty("ratingsCount")]
public int RatingsCount { get; set; }
[JsonProperty("author")]
public AuthorJsonResource Author { get; set; }
[JsonProperty("kcrPreviewUrl")]
public string KcrPreviewUrl { get; set; }
[JsonProperty("description")]
public DescriptionJsonResource Description { get; set; }
}
public class AuthorJsonResource
{
[JsonProperty("id")]
public int Id { get; set; }
[JsonProperty("name")]
public string Name { get; set; }
[JsonProperty("isGoodreadsAuthor")]
public bool IsGoodreadsAuthor { get; set; }
[JsonProperty("profileUrl")]
public string ProfileUrl { get; set; }
[JsonProperty("worksListUrl")]
public string WorksListUrl { get; set; }
}
public class DescriptionJsonResource
{
[JsonProperty("html")]
public string Html { get; set; }
[JsonProperty("truncated")]
public bool Truncated { get; set; }
[JsonProperty("fullContentUrl")]
public string FullContentUrl { get; set; }
}
}