From 4d41c28f3cdc307ca1d0cd2b4ae5570b8939918b Mon Sep 17 00:00:00 2001 From: Jim Miller Date: Thu, 12 Dec 2013 17:59:41 -0600 Subject: [PATCH] Fix a bug with AO3 single chapter stories introduced with do_update_hook. --- app.yaml | 2 +- calibre-plugin/__init__.py | 2 +- fanficdownloader/adapters/adapter_archiveofourownorg.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/app.yaml b/app.yaml index c2dd6d29..8c60a812 100644 --- a/app.yaml +++ b/app.yaml @@ -1,6 +1,6 @@ # ffd-retief-hrd fanfictiondownloader application: fanfictiondownloader -version: 4-4-87 +version: 4-4-88 runtime: python27 api_version: 1 threadsafe: true diff --git a/calibre-plugin/__init__.py b/calibre-plugin/__init__.py index 89ebb98f..1e12a83e 100644 --- a/calibre-plugin/__init__.py +++ b/calibre-plugin/__init__.py @@ -42,7 +42,7 @@ class FanFictionDownLoaderBase(InterfaceActionBase): description = _('UI plugin to download FanFiction stories from various sites.') supported_platforms = ['windows', 'osx', 'linux'] author = 'Jim Miller' - version = (1, 8, 04) + version = (1, 8, 05) minimum_calibre_version = (1, 13, 0) #: This field defines the GUI plugin class that contains all the code diff --git a/fanficdownloader/adapters/adapter_archiveofourownorg.py b/fanficdownloader/adapters/adapter_archiveofourownorg.py index 2d933021..a35f82e4 100644 --- a/fanficdownloader/adapters/adapter_archiveofourownorg.py +++ b/fanficdownloader/adapters/adapter_archiveofourownorg.py @@ -188,7 +188,7 @@ class ArchiveOfOurOwnOrgAdapter(BaseSiteAdapter): self.story.setMetadata('numChapters',len(chapters)) logger.debug("numChapters: (%s)"%self.story.getMetadata('numChapters')) if len(chapters)==1: - self.chapterUrls.append((self.story.getMetadata('title'),'http://'+self.host+chapter['href']+addurl)) + self.chapterUrls.append((self.story.getMetadata('title'),'http://'+self.host+chapters[0]['href']+addurl)) else: for index, chapter in enumerate(chapters): # strip just in case there's tags, like in chapter titles.