Skip to content

Series Position is pulled from Hardcover incorrectly #61

@andrewtwelch

Description

@andrewtwelch

What Went Wrong?

Hardcover's series position is stored on their end as a float (as does BookLore), however it appears that when the metadata is fetched, this is converted into an integer, leaving any position that is not a round number to be rounded incorrectly.

I believe the problematic line is https://github.com/grimmory-tools/grimmory/blob/main/booklore-api/src/main/java/org/booklore/service/metadata/parser/hardcover/GraphQLResponse.java#L255, however I don't know if anywhere else would need to be updated.

How Can We Reproduce This?

  1. Attempt to fetch metadata from Hardcover for any book in a series with a position that is not a round number (i.e. slug the-sins-of-our-fathers, position is 9.5)
  2. See that the UI shows that number rounded (above example shows as 9 instead)

What Should Have Happened?

The position for the book should show correctly as the non-rounded number.

Screenshots or Error Messages (Optional)

No response

Any Ideas on How to Fix This? (Optional)

Bring this number in as a float (or whatever the equivalent would be in Java)

Your Setup

Booklore v2.2.1

Before Submitting

  • I've searched existing issues and confirmed this bug hasn't been reported yet

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions