From bc4876d251b86283ad196d040f0a79db51521e15 Mon Sep 17 00:00:00 2001 From: Jim Miller Date: Sun, 4 Nov 2012 12:21:56 -0600 Subject: [PATCH] Honor begin/end chapters on update. For testing purposes. --- calibre-plugin/jobs.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/calibre-plugin/jobs.py b/calibre-plugin/jobs.py index 89d390f..44d731e 100644 --- a/calibre-plugin/jobs.py +++ b/calibre-plugin/jobs.py @@ -126,6 +126,7 @@ def do_download_for_worker(book,options): adapter.is_adult = book['is_adult'] adapter.username = book['username'] adapter.password = book['password'] + adapter.setChaptersRange(book['begin'],book['end']) story = adapter.getStoryMetadataOnly() if 'calibre_series' in book: @@ -148,8 +149,6 @@ def do_download_for_worker(book,options): elif options['collision'] in (ADDNEW, SKIP, OVERWRITE, OVERWRITEALWAYS) or \ ('epub_for_update' not in book and options['collision'] in (UPDATE, UPDATEALWAYS)): - adapter.setChaptersRange(book['begin'],book['end']) - print("write to %s"%outfile) writer.writeStory(outfilename=outfile, forceOverwrite=True) book['comment'] = 'Download %s completed, %s chapters.'%(options['fileform'],story.getMetadata("numChapters"))