Skip to content
This repository has been archived by the owner on Apr 11, 2024. It is now read-only.

Add option to format point-chapters with dots instead of hyphens #454

Open
IAMSolaara opened this issue Jun 7, 2022 · 2 comments
Open

Comments

@IAMSolaara
Copy link

Feature request

Is your feature request related to a problem? Please describe.
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

This definitely would help keeping my Komga library as automated as possible.
Every time some point-vhapters appear they tend to not get parsed as such and there can be instances like chapter 185.5 being after 210 (which disrupts the reading experience a fair bit).
This requires some manual metadata edits in Komga that would be avoidable were chapter numbers properly formatted.

Describe the solution you'd like
A clear and concise description of what you want to happen.

I'd like to be able to set this behavior via a command-line switch like "--dotchapters" or something like that.

Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.

Another way to do this (but would definitely require more work) could be like youtube-dl's output format option.

Additional context
Add any other context or screenshots about the feature request here.

@IAMSolaara
Copy link
Author

Since I forgot to leave it in the issue body I'll put this here.

As an example, currently Chapter 34.2 would be saved as vol_034-2.cbz.

With this implemented it should be saved as vol_034.2.cbz.

@IAMSolaara
Copy link
Author

Hello,
after doing a little digging I found an example of where this could be done.
As most of the manga I download comes from manganato.com I started looking into its provider (and then Manganelo's).
In here I can clearly see what could be altered for this modification:

def get_chapter_index(self) -> str:
return self.re.search(self.chapter_re, self.get_chapter())\
.group(1).replace('.', '-')

After attempting this on a local copy though I can see a potential reason why this was done, as the left-padding of chapter numbers clearly doesn't work on floating-point values:
image
Nonetheless I think there can be workarounds to this (I once had this same issue (for my custom anime downloader) and I got around this by separating the number, zeropadding only the integer part and then concat-ing their string forms with a ., but I don't know how good of a workaround this is).

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

No branches or pull requests

2 participants