kiwilan / php-opds

PHP package to create OPDS feed (Open Publication Distribution System) for eBooks.
https://packagist.org/packages/kiwilan/php-opds
MIT License
6 stars 2 forks source link

[Bug]: Parameter $volume of class Kiwilan\Opds\Entries\OpdsEntryBook constructor expects int|null, float|null give #36

Closed mikespub closed 11 months ago

mikespub commented 11 months ago

What happened?

I might as well post this one too while I'm reporting issues :-)

As the title says, OpdsEntryBook expects 'volume' to be int, but Calibre actually uses float to cover series indexes like 1.25

And the OPDS 2.0 draft states that the 'position' it is converted to can be either an integer or a float: https://github.com/readium/webpub-manifest/tree/master/contexts/default which translates to type 'number' in json schema: https://json-schema.org/understanding-json-schema/reference/numeric.html#number

How to reproduce the bug

Try to use calibre series_index for volume

Package Version

1.0.23

PHP Version

8.2

Which operating systems does with happen with?

Linux

Notes

No response

ewilan-riviere commented 11 months ago

Tell me if it's okay with v1.0.30 ;)

mikespub commented 11 months ago

Thanks, works for me