komga
komga copied to clipboard
[Feature Request] use `year` when importing `.cbl` for matching
Komga environment
- OS: Docker
- Komga version: v0.144.0
- [X] I am running Komga with Docker
- Docker image tag [e.g. latest, beta]: v0.144.0
- [ ] I am running Komga from the
jar
- Java version:
- [ ] I have a problem in the web interface
- Browser (with version):
- [ ] I have a problem with an OPDS client application
- OPDS Application (with version):
- [ ] I have a problem with the Tachiyomi extension
- Tachiyomi version:
- Tachiyomi extension version:
Describe the bug
When I have 2 series with the same series name and the same volume but with different years of the comic and I create a cbl file with ComicRack Komga can not find this comics. The reason looks like that Komga ignore the year tag.
Steps to reproduce
- extract the sample in a folder and add this folder to komga.
- Go to Import.
- Click on Import Reading Lists
- Select the reading list with same series name, number, volume number but different years.
- Import the list
- see the errors
Expected behavior
I expect that when series name, number, volume and year are different than komga should find the right file.
Actual behavior
No unique match for series.
Additional context
Add any other context about the problem here.
Screenshots
see attachment
Log file
If applicable, add an excerpt of the log file (max 20 lines) AND attach the complete log file or a link to a gist/pastebin containing the log file (where to find the logs).
I add also a zip file to reproduce it on this report. CBL Test.zip
Do you have a real example where that happened?
here are 2 examples for a batman series with volume 1997: https://www.comicguide.de/book/63507/Batman-1 https://www.comicguide.de/series/4827/Batman-%28Heft%2C-Dino%29 Batman - both Volume 1997 - Number 6 - Dino with story Underworld (year 1997), ehapa no story line at number 6 (1998). This happens with bigger series when they are published in other countries which are different than the producer land. The countries creates own series names and volume numbers.
Something i don't understand, you write:
I expect that when series name, number, volume and year are different than komga should find the right file.
But both series in your real life example have the same volume (1997), so they also have the same year (1997).
It would work if the year
attribute referenced the year of the book, not of the series, but that is something i cannot confirm, because the cbl
XML schema is undocumented.
Thank you for investing time on this topic.
What is the problem, when you have 3 information: series name, volume name, year to use all 3 parameters for finding the right comic? the 3 paramters are available - so why not using them? When you say, this problem is not so often because it is only a country problem and you don't want to fix this - thats also fine. But I find out a gap and tried to find a solution to make komga fantastic :-)
yes, cbl xml schema is not documented .. but when I use comicrack it creates always this 3 information when it is available for this comic in comirack: series name, volume and year. I am using ComicRack v0.9.178.
What is the problem, when you have 3 information: series name, volume name, year to use all 3 parameters for finding the right comic? the 3 paramters are available - so why not using them?
It's a feature request, so it's not been done before.
When you say, this problem is not so often because it is only a country problem and you don't want to fix this - thats also fine.
I never said I don't want to fix it. I asked for real life example because made up examples are not representative.
yes, cbl xml schema is not documented .. but when I use comicrack it creates always this 3 information when it is available for this comic in comirack: series name, volume and year. I am using ComicRack v0.9.178.
Is it using the year of the series or the year of the book for that field?
I was not aware how you built those files (you didn't explain), and since I have never used ComicRack, I cannot confirm whether the year is the year of the book or the series. If you are able to confirm that point that would help, else I cannot work on this.
In Comicrack, the year property is the release year of the book. Volume (if using the ComicVine API scraper plugin) is the year of the first issue
.
In Comicrack, the year property is the release year of the book. Volume (if using the ComicVine API scraper plugin) is the year of the first issue
.
What does the xml look like if the book has no year?
Here's an example ComicRack generated comicinfo.xml when the publish date is blank
Here's an example ComicRack generated comicinfo.xml when the publish date is blank
I'm interested in the cbl, not the comicinfo.xml 😅
Sorry for the confusion, here is an example Reading List, the first book without a publishdate, the second one with. List Test with Year and without.txt
This would be extremely helpful :)
It looks like this is a matter of:
- Adding 'val year: String' - ReadListRequest.kt ln 14
- Use 'seriesRepository.findAll(book.series + " " + book.year)' - ReadListMatcher.kt line 37
The cbl parser would also need to be updated to extract the year and pass it to the ReadListMatcher, but don't know where that's all handled.
I'm also seeing this quite a bit. For what I have seen it is when there is a TPB released in the same year as a limited series. Usually the TPB is a year later, so it isn't an issue, but sometimes it does happen in the same year. Unfortunately, the proposed fix will only address the issue if the published year is different for book 1 and the TPB. The series Dark Reign Made Men, has this issue, but the years and volumes are all the same.
I don't know what the options are. In theory you could use the format tag. My books aren't properly tagged, and it should say TPB instead of limited series, for the first one but I don't think that is a tag that comicvine populates, so I don't think it will be much use. Perhaps mylar could add the tag based on a ruleset, but not sure.
Or we move away from the existing CBL list format and create something else using CV series identifier, perhaps.. and then use some other app to create the list, not sure. For me the fix is to delete the TPB and just reference the limited series.
`
</Book>
<Book Series="Dark Reign: Made Men" Number="1" Volume="2009" Year="2009" Format="Limited Series">
<Id>2ddfa631-2095-4619-ab34-86384c0dc607</Id>
</Book>
<Book Series="Dark Reign: Made Men" Number="2" Volume="2009" Year="2009" Format="Limited Series">
<Id>051b99c1-c2e8-41b1-85f9-ae43c31a4f46</Id>
</Book>
<Book Series="Dark Reign: Made Men" Number="3" Volume="2009" Year="2009" Format="Limited Series">
<Id>e96b3747-8f04-49cd-acce-fdfa1f22dead</Id>
</Book>
<Book Series="Dark Reign: Made Men" Number="4" Volume="2009" Year="2009" Format="Limited Series">
<Id>45682c24-2109-4ea8-b4cb-b928be6c5c43</Id>
</Book>
<Book Series="Dark Reign: Made Men" Number="5" Volume="2009" Year="2009" Format="Limited Series">
<Id>31744396-2ba8-46fb-a4e7-46db6f5e5a87</Id>
</Book>
I started looking at this, but after reading the history it seems there is some confusion.
The Year
attribute in the .cbl
file is the book's release year. It has nothing to do with the series.
The first post is about not finding the right series.
If we use the book's year, it can only be used to locate the book, it cannot help to locate the series, thus that would not issue.
It could be used to find the right book when there are more than 1 matches, but that's not what the original issue is about.
Yep, I think I added my suggestion above to the wrong issue on Github, apologies. It probably belongs with #1009.
Is Komga currently using the Volume field correctly when importing series? I think my comment above was based around the fact that only the series title is checked currently. The idea was that a year field should be added to the series object so this series year can be stored from the Volume tag.
The only problem with this is when the volume field contains an actual volume number and not a year. :/ I guess you should be able to process whether the entry is a year or volume number using regex and assign them to different properties, but not sure what the implications of this are.
Basically, if more than one series title match is found, Komga doesn't know what to do? I may be reading ReadListMatcher.kt wrong here though.
Is Komga currently using the Volume field correctly when importing series? I think my comment above was based around the fact that only the series title is checked currently.
Yes. Komga doesn't have a volume field, but the volume is added in brackets in the series title when importing from Comicinfo.xml
, the same logic is used when matching series via a .cbl
file.
Basically, if more than one series title match is found, Komga doesn't know what to do? I may be reading ReadListMatcher.kt wrong here though.
Yes, because the readlist import is a one shot operation of request/macthing. I have plans to change it to a 2-step operation, which will allow for interactive import and corrective actions in the UI, a bit how the book import feature works.
That should solve all those problems.
Closing this as the latest release has interactive import of cbl files.