fix(hardcover): add series position decimals and use primary books count (#87)
* fix: fixed halves missing from series number in Hardcover metadata * fix: use series primary books count
This commit is contained in:
+2
-2
@@ -231,7 +231,7 @@ public class HardcoverParser implements BookParser {
|
||||
|
||||
if (book.getFeaturedBookSeries() != null && book.getFeaturedBookSeries().getSeries() != null) {
|
||||
metadata.setSeriesName(book.getFeaturedBookSeries().getSeries().getName());
|
||||
metadata.setSeriesTotal(book.getFeaturedBookSeries().getSeries().getBooksCount());
|
||||
metadata.setSeriesTotal(book.getFeaturedBookSeries().getSeries().getPrimaryBooksCount());
|
||||
|
||||
if (book.getFeaturedBookSeries().getPosition() != null) {
|
||||
try {
|
||||
@@ -316,7 +316,7 @@ public class HardcoverParser implements BookParser {
|
||||
}
|
||||
if (doc.getFeaturedSeries().getSeries() != null) {
|
||||
metadata.setSeriesName(doc.getFeaturedSeries().getSeries().getName());
|
||||
metadata.setSeriesTotal(doc.getFeaturedSeries().getSeries().getBooksCount());
|
||||
metadata.setSeriesTotal(doc.getFeaturedSeries().getSeries().getPrimaryBooksCount());
|
||||
}
|
||||
if (doc.getFeaturedSeries().getPosition() != null) {
|
||||
try {
|
||||
|
||||
+3
-1
@@ -252,7 +252,7 @@ public class GraphQLResponse {
|
||||
@AllArgsConstructor
|
||||
@JsonIgnoreProperties(ignoreUnknown = true)
|
||||
public static class FeaturedSeries {
|
||||
private Integer position;
|
||||
private Float position;
|
||||
private Series series;
|
||||
}
|
||||
|
||||
@@ -265,6 +265,8 @@ public class GraphQLResponse {
|
||||
private String name;
|
||||
@JsonProperty("books_count")
|
||||
private Integer booksCount;
|
||||
@JsonProperty("primary_books_count")
|
||||
private Integer primaryBooksCount;
|
||||
}
|
||||
|
||||
@Getter
|
||||
|
||||
+1
@@ -57,6 +57,7 @@ public class HardcoverBookSearchService {
|
||||
series {
|
||||
name
|
||||
books_count
|
||||
primary_books_count
|
||||
}
|
||||
position
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user