diff --git a/calibre-plugin/__init__.py b/calibre-plugin/__init__.py index 18a84c4..e12608d 100644 --- a/calibre-plugin/__init__.py +++ b/calibre-plugin/__init__.py @@ -27,7 +27,7 @@ class FanFictionDownLoaderBase(InterfaceActionBase): description = 'UI plugin to download FanFiction stories from various sites.' supported_platforms = ['windows', 'osx', 'linux'] author = 'Jim Miller' - version = (1, 5, 41) + version = (1, 5, 42) minimum_calibre_version = (0, 8, 30) #: This field defines the GUI plugin class that contains all the code diff --git a/fanficdownloader/adapters/adapter_fanfictionnet.py b/fanficdownloader/adapters/adapter_fanfictionnet.py index 417986d..981119a 100644 --- a/fanficdownloader/adapters/adapter_fanfictionnet.py +++ b/fanficdownloader/adapters/adapter_fanfictionnet.py @@ -182,8 +182,9 @@ class FanFictionNetSiteAdapter(BaseSiteAdapter): self.story.extendList('genre',genrelist) metalist=metalist[1:] + donechars = False while len(metalist) > 0: - if metalist[0].startswith('Reviews') or metalist[0].startswith('Chapters') or metalist[0].startswith('Status'): + if metalist[0].startswith('Reviews') or metalist[0].startswith('Chapters') or metalist[0].startswith('Status') or metalist[0].startswith('id:'): pass elif metalist[0].startswith('Updated'): self.story.setMetadata('dateUpdated',makeDate(metalist[0].split(':')[1].strip(), '%m-%d-%y')) @@ -191,9 +192,9 @@ class FanFictionNetSiteAdapter(BaseSiteAdapter): self.story.setMetadata('datePublished',makeDate(metalist[0].split(':')[1].strip(), '%m-%d-%y')) elif metalist[0].startswith('Words'): self.story.setMetadata('numWords',metalist[0].split(':')[1].strip()) - pass - else: + elif not donechars: self.story.extendList('characters',metalist[0].split('&')) + donechars = True metalist=metalist[1:] # next might be characters, otherwise Reviews, Updated, Published, Words