Skip to content

fix for self-closing tags - #2

Open
davidgith1 wants to merge 3 commits into
KORComic:mainfrom
davidgith1:patch-1
Open

fix for self-closing tags#2
davidgith1 wants to merge 3 commits into
KORComic:mainfrom
davidgith1:patch-1

Conversation

@davidgith1

Copy link
Copy Markdown

Initally proposed this fix here but this fix makes more sense in the lib.

My previous explanation:

I'm using koreader + comicmeta on Android.

  1. Have a cbz file which has a ComicInfo.xml file that looks like f.e. this:
<?xml version="1.0" encoding="utf-8"?>
<ComicInfo><Title>Ruri Dragon - Ch.48</Title><Series>Ruri Dragon</Series><Number>48</Number><Count>0</Count><Volume>0</Volume><AlternateSeries/><AlternateNumber/><AlternateCount>0</AlternateCount><Summary/><Notes/><Year>0</Year><Month>0</Month><Day>0</Day><Writer/><Penciller/><Inker/><Colorist/><Letterer/><CoverArtist/><Editor/><Translator/><Publisher/><Imprint/><Genre/><Tags/><Web/><PageCount>19</PageCount><LanguageIso/><Format/><BlackAndWhite/><Manga>YesAndRightToLeft</Manga><Characters/><Teams/><Locations/><ScanInformation/><StoryArc/><StoryArcNumber/><SeriesGroup/><AgeRating/><MainCharacterOrTeam/><Review/><Gtin/></ComicInfo>

The important part is that is has at least one self closing tag:

<ComicInfo>
<Title>Chapter 1</Title>
<Writer/>
</ComicInfo>
  1. Navigate to the folder of that cbz file and trigger metadata extraction (menu → "Extract Comic Meta").
  2. The extraction will start but when it finishes it will say: Comic metadata extraction complete. Successfully extracted 0 / 1
    No errors and nothing extracted.

After this fix, a ComicInfo.xml like the examples above will result in a successful extraction.

The self-closing tags come back as tables so it fails when the plugin is expecting a string. This fix make them come back as an empty string instead.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant