Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Attempt at fixing "de-dupe cover" breaking chapters #743

Open
wants to merge 7 commits into
base: master
Choose a base branch
from

Conversation

bust4cap
Copy link

@bust4cap bust4cap commented Sep 10, 2024

should fix #742

(also fixing general page spread alignment)

@axu2
Copy link
Collaborator

axu2 commented Nov 7, 2024

Wouldn't it be simpler to just add a offset of 1 on this line if the option is checked?

https://github.com/ciromattia/kcc/blob/master/kindlecomicconverter/comic2ebook.py#L534

@bust4cap

@bust4cap
Copy link
Author

Wouldn't it be simpler to just add a offset of 1 on this line if the option is checked?

https://github.com/ciromattia/kcc/blob/master/kindlecomicconverter/comic2ebook.py#L534

maybe i did something wrong but doing it that way if the first page is a chapter (aka "cover" for example) its instead just a copy of the last chapter again

kcc_chapters

@axu2
Copy link
Collaborator

axu2 commented Nov 10, 2024

Oh that's because the -1 index is the last item of a list in python.

e.g.

long_list = [1,2,3]
print(long_list[-1])

prints 3

So some additional logic to skip the first chapter if its only one page. Or clamp the index to zero if multiple pages.

@bust4cap
Copy link
Author

someone more capable than me should probably take this over if another approach is preferred^^

@axu2
Copy link
Collaborator

axu2 commented Nov 11, 2024

Went ahead and opened a PR please review and test.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Chapters are off by 1 Page if "De-dupe cover" is enabled
2 participants