From f20a02a2bce75dfd7be516f950ad01b2c5d59951 Mon Sep 17 00:00:00 2001 From: Jim Miller Date: Thu, 25 Apr 2013 22:00:58 -0500 Subject: [PATCH] Catch errors on db.set_cover(). --- calibre-plugin/ffdl_plugin.py | 5 ++++- fanficdownloader/adapters/adapter_test1.py | 1 + index.html | 4 ++-- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/calibre-plugin/ffdl_plugin.py b/calibre-plugin/ffdl_plugin.py index 9c9058c5..358b9189 100644 --- a/calibre-plugin/ffdl_plugin.py +++ b/calibre-plugin/ffdl_plugin.py @@ -1281,7 +1281,10 @@ class FanFictionDownLoaderPlugin(InterfaceAction): existingepub = db.format(book_id,'EPUB',index_is_id=True, as_file=True) epubmi = get_metadata(existingepub,'EPUB') if epubmi.cover_data[1] is not None: - db.set_cover(book_id, epubmi.cover_data[1]) + try: + db.set_cover(book_id, epubmi.cover_data[1]) + except: + print("Failed to set_cover, skipping") # set author link if found. All current adapters have authorUrl, except anonymous on AO3. if 'authorUrl' in book['all_metadata']: diff --git a/fanficdownloader/adapters/adapter_test1.py b/fanficdownloader/adapters/adapter_test1.py index 2a38c93e..1a000ca3 100644 --- a/fanficdownloader/adapters/adapter_test1.py +++ b/fanficdownloader/adapters/adapter_test1.py @@ -139,6 +139,7 @@ Some more longer description. "I suck at summaries!" "Better than it sounds!" self.story.addToList('characters','J. Rizzoli') self.story.addToList('category',u'Pitch Perfect') self.story.addToList('characters','Chloe B.') + self.story.addToList('ships','Chloe B. & J. Rizzoli') elif self.story.getMetadata('storyId') == '82': self.story.addToList('characters','Henry (Once Upon a Time)') self.story.addToList('category',u'Once Upon a Time (TV)') diff --git a/index.html b/index.html index 09a01501..8eea2836 100644 --- a/index.html +++ b/index.html @@ -599,12 +599,12 @@ Use the URL of the story's chapter list, such as
http://www.henneth-annun.net/stories/chapter.cfm?stid=1234 -
http://www.psychfic.com
+
www.psychfic.com
Use the URL of the story's chapter list, such as
http://www.psychfic.com/viewstory.php?sid=1234
-
http://tokra.fandomnet.com
+
tokra.fandomnet.com
Use the URL of the story's chapter list, such as
http://tokra.fandomnet.com/viewstory.php?sid=1234