From 8b31ba59afa43630273149e9e1ef009adb975acb Mon Sep 17 00:00:00 2001 From: Jim Miller Date: Fri, 2 Aug 2013 13:39:36 -0500 Subject: [PATCH] Warning if existing epub has no recognizable chapters. --- calibre-plugin/ffdl_plugin.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/calibre-plugin/ffdl_plugin.py b/calibre-plugin/ffdl_plugin.py index 78ddf1af..174b7f8c 100644 --- a/calibre-plugin/ffdl_plugin.py +++ b/calibre-plugin/ffdl_plugin.py @@ -976,6 +976,8 @@ class FanFictionDownLoaderPlugin(InterfaceAction): skip_date_update = True elif chaptercount > urlchaptercount: raise NotGoingToDownload("Existing epub contains %d chapters, web site only has %d. Use Overwrite to force update." % (chaptercount,urlchaptercount),'dialog_error.png') + elif chaptercount == 0: + raise NotGoingToDownload("FFDL doesn't recognize chapters in existing epub, epub is probably from a different source. Use Overwrite to force update.",'dialog_error.png') if collision == OVERWRITE and \ db.has_format(book_id,formmapping[fileform],index_is_id=True):