ComicInfo.xml "Volume" element seems wrong, possibly should be "Number" instead?
See original GitHub issueBug report
Environment (please complete the following information):
Description | Data |
---|---|
Manga-py version | 1.29.5 |
To Reproduce:
Steps to reproduce the behavior:
- Download a series with a volume name of “67-1” (an example)
- ComicInfo.xml looks like this in the first few lines:
<?xml version="1.0"?>
<ComicInfo xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<Title>blah_blah</Title>
<Volume>67-1</Volume>
<PageCount>20</PageCount>
.....
- Trying to use komga to analyze the metadata of the cbz that contains it throws an error:
Cannot deserialize value of type `java.lang.Integer` from String "67-1": not a valid Integer value
- Searching for a definition of the comicinfo xml format led me to this gist. Seems that Volume should only be an Int. Number is freeform. In this case, I think Number is perhaps more apt since it is a semi-freeform value like “67-1” or “66”, depending on the manga site and how they format volume names (manga-py appears to convert “67.1” to “67-1” already so filenames are better).
- In
download_methods.py
, I changed the following:
--- download_methods_old.py 2021-04-27 20:25:39.977518478 -0700
+++ download_methods.py 2021-04-27 20:25:23.633284790 -0700
@@ -159,7 +159,7 @@
def _book_info_xml(self):
comic_info = ComicInfo()
- comic_info.volume(self.provider.get_chapter_index())
+ comic_info.number(self.provider.get_chapter_index())
comic_info.title(self.provider.name)
comic_info.pages(self.__pages_cache)
comic_info.page_count(str(len(self.__pages_cache)))
Output xml is now:
<?xml version="1.0"?>
<ComicInfo xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<Title>blah_blah</Title>
<Number>67-1</Number>
<PageCount>20</PageCount>
.....
- With the change komga parses the xml happy, and even seems to get the sorting (individual cbz “book” number) more correct.
Issue Analytics
- State:
- Created 2 years ago
- Comments:7 (3 by maintainers)
Top Results From Across the Web
Export story arc number to comicinfo.xml · Issue #411
Describe the request Story arc number is currently stored in the mylar db, but not exported to ComicInfo.xml, due to the lack of...
Read more >ComicInfo.xml : r/KavitaManga
Is there anyway to edit multiple archives with the same tags in ComicTagger GUI? I can't figure it out. I select all the...
Read more >ComicRack Manual (5th ed) by Ricardo Pescuma
I hope the manual would prove useful to the users of ComicRack™. ... Once the Comicinfo.xml file is stored in CBZ or CB7...
Read more >Challenger Comics Viewer FAQ
Once library is created, next file will be automatically load (after last page if current comics). Q: Images are displayed in wrong order,...
Read more >Writing a comics manager for Krita
In Krita, getting the next or previous page is always a matter of digging through folders and finding the correct page number.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
https://bato [.] to/series/83648/boku-no-hero-academia-official
(url munged a bit to not link directly)Thank you for your issue, I’ll think about how to fix it