question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

ComicInfo.xml "Volume" element seems wrong, possibly should be "Number" instead?

See original GitHub issue

Bug report

Environment (please complete the following information):

Description Data
Manga-py version 1.29.5

To Reproduce:

Steps to reproduce the behavior:

  1. Download a series with a volume name of “67-1” (an example)
  2. 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>
.....
  1. 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
  1. 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).
  2. 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>
.....
  1. With the change komga parses the xml happy, and even seems to get the sorting (individual cbz “book” number) more correct.

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:7 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
dropwhilecommented, Apr 28, 2021

Do you remember on which site it happened?

https://bato [.] to/series/83648/boku-no-hero-academia-official (url munged a bit to not link directly)

1reaction
1271commented, Apr 28, 2021

Thank you for your issue, I’ll think about how to fix it

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found