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

Numbers in the series name recognized as chapter number if no chapter number in comicinfo.xml #2908

Open
CtrlAltDefeat94 opened this issue Apr 23, 2024 · 12 comments
Labels
discussion In active discussion help wanted Extra attention is needed

Comments

@CtrlAltDefeat94
Copy link

What happened?

When the series name in the title contains a number such as Fairy Tail: 100 Years Quest Vol. 1: New Start, New Quest, this number is parsed as a chapter number. All volumes in this series are added for both their Volume number and Chapter 100.

What did you expect?

If a cbz file has a comicinfo.xml and does not contain a Chapter tag, it should not add a chapter number.

Kavita Version Number - If you don not see your version number listed, please update Kavita and see if your issue still persists.

0.8.1 - Stable

What operating system is Kavita being hosted from?

Docker (Dockerhub Container)

If the issue is being seen on Desktop, what OS are you running where you see the issue?

None

If the issue is being seen in the UI, what browsers are you seeing the problem on?

No response

If the issue is being seen on Mobile, what OS are you running where you see the issue?

None

If the issue is being seen on the Mobile UI, what browsers are you seeing the problem on?

No response

Relevant log output

No response

Additional Notes

No response

@CtrlAltDefeat94 CtrlAltDefeat94 added the needs-triage Needs to be triaged by a developer and assigned a release label Apr 23, 2024
@CtrlAltDefeat94
Copy link
Author

Is there anything I can help with to get this out of the triage stage?
I'm currently unable to get (and keep) the Re Zero manga's in Kavita, as it gets confused by the Chapter in the series title.

@majora2007
Copy link
Member

I need community help with this because partial ComicInfo is a feature many people need. You shouldn't have to tag everything perfectly to correct one issue.

The problem comes from the filename parser, but it's not something that can be fixed per-se. My idea would be to use a unique symbol that would never be real that Kavita can read and ignore said field.

@majora2007 majora2007 added discussion In active discussion help wanted Extra attention is needed and removed needs-triage Needs to be triaged by a developer and assigned a release labels Aug 24, 2024
@majora2007 majora2007 pinned this issue Aug 24, 2024
@majora2007
Copy link
Member

@CtrlAltDefeat94 can you try for now as a temp workaround to tag the Number field as -100000 and see if that works for you? It's not ideal, but it is the internal encoding that Kavita uses when there is no chapter number.

@Roshri
Copy link

Roshri commented Aug 24, 2024

I'm all in for a special value in comicinfo. So far Ive been tagging these as chapter 0 as a legacy measure.
I'm not sure about parser logic but shouldn't it discard a number if found before volume and/or chapter markers in the filename? AFAIK it should work for Manga naming standards

@majora2007
Copy link
Member

Here is the situation with filename parsing:
ABC Chapter 4 - A title.cbz
and
"DEF Chapter 4 - A title.cbz

These are both real titles. The first is the Re:ZERO Chapter 4 case, where Chapter 4 is part of the series name. Whereas Bleach Chapter 4 - Death Gods also is a valid case, where Bleach is the series name.

From a filename parsing standpoint, there is no way to know the difference so there is no way to write a rule to accurately identify. The latter is the most common.

So Using a unique key, like kavita or ignore might be needed. Especially since the standard is pretty frozen.

@SleepingPanda
Copy link

SleepingPanda commented Jan 12, 2025

Is it not possible to let the user manually override the parser?

@majora2007
Copy link
Member

@SleepingPanda That is what tagging your files with metadata is doing. It's telling Kavita exactly what to take it as.

@SleepingPanda
Copy link

Right but tagging potentially hundreds of files may not always be a reasonable option. I'm asking if there is no way to allow that from within Kavita itself.

@majora2007
Copy link
Member

I don't think so. I did a proof of concept to allow a library where the user defines the Regex, but it wouldn't necessarily solve this problem and was quite complex to support (and likely will be underused due to the complexities of parsing--the reason we have this issue to begin with).

Just allowing loose filenames is not something I want the software to support nor something I want to be restricted to design around for future UX work.

@SleepingPanda
Copy link

There's a surprisingly wide variety of series with numbers in their names and I don't think tagging our files with a Kavita-specific symbol should be the long-term solution. There are use cases like mine (and a friend's) where files can't be modified for example.

@CtrlAltDefeat94
Copy link
Author

I would find a setting useful to disable filename parsing for any file that contains a comicinfo.xml.
If the tag isnt in the comicinfo, it means that tag shouldnt be used at all.
For example Re Zero volumes with Chapter X in their titles dont have a chapter tag inside the comicinfo, so there's no need to parse it as such.

@majora2007
Copy link
Member

I would find a setting useful to disable filename parsing for any file that contains a comicinfo.xml. If the tag isnt in the comicinfo, it means that tag shouldnt be used at all. For example Re Zero volumes with Chapter X in their titles dont have a chapter tag inside the comicinfo, so there's no need to parse it as such.

I would be open to trying something like this. If you could open a FR and link back to this thread, that would help ensure it doesn't get lost.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
discussion In active discussion help wanted Extra attention is needed
Projects
Development

No branches or pull requests

4 participants