gvellut / jncep

Command-line tool to generate EPUB files for J-Novel Club pre-pub novels
GNU General Public License v3.0
43 stars 11 forks source link

Unable to specify parts #15

Closed NaruZosa closed 2 years ago

NaruZosa commented 2 years ago

Using -s or --parts fails, but download succeeds if parts aren't specified

C:\Users\Bradley>jncep epub https://j-novel.club/series/my-instant-death-ability-is-so-overpowered-no-one-in-this-other-world-stands-a-chance-against-me -s 9.6:9.8
Logged in with email 'jeansmyth141@gmail.com'
Use part specification '9.6:9.8'
Logout...
*** An unrecoverable error occured ***
'Volume' object has no attribute 'volume_num'

C:\Users\Bradley>jncep epub https://j-novel.club/series/my-instant-death-ability-is-so-overpowered-no-one-in-this-other-world-stands-a-chance-against-me --parts 9.6:9.8
Logged in with email 'jeansmyth141@gmail.com'
Use part specification '9.6:9.8'
Logout...
*** An unrecoverable error occured ***
'Volume' object has no attribute 'volume_num'

C:\Users\Bradley>jncep epub https://j-novel.club/series/my-instant-death-ability-is-so-overpowered-no-one-in-this-other-world-stands-a-chance-against-me
Logged in with email 'jeansmyth141@gmail.com'
Some of the requested parts are not available for reading!
Success! EPUB generated in 'C:\Users\Bradley\My_Instant_Death_Ability_Is_So_Overpowered_No_One_in_This_Other_World_Stands_a_Chance_Against_Me_Volumes_1_2_3_4_5_6_7_8_9_10_Parts_1_1_to_10_3.epub'!
Logout...

This worked in v26, unsure about v27.

NaruZosa commented 2 years ago

Cause found, patch submitted.

Thank you for the fantastic program :)

NaruZosa commented 2 years ago

Hmm. It used to be possible to specify part ranges, but this patch only fixes single part specification.

Part ranges downloads the whole volume instead (attempted with Instant Death parts 9.6:9.8).

Downloading 9.6 is successful, but 9.6:9.8 downloads the full volume.

gvellut commented 2 years ago

Thank you. I will merge your bugfix and will correct if necessary so all cases are handled.

gvellut commented 2 years ago

There is indeed a bug in the handling if the 2 sides of the parts have the same volume (as in 9.6:9.8)

gvellut commented 2 years ago

I made the fix. I will make a release soon.