diff --git a/calibre-plugin/config.py b/calibre-plugin/config.py index 0482ac37..56d3f6bc 100644 --- a/calibre-plugin/config.py +++ b/calibre-plugin/config.py @@ -723,7 +723,11 @@ class GenerateCoverTab(QWidget): dropdown.addItem('',QVariant('none')) for setting in gc_settings: dropdown.addItem(setting,QVariant(setting)) - self.gc_dropdowns[site] = dropdown + if site == _("Default"): + self.gc_dropdowns["Default"] = dropdown + dropdown.setCurrentIndex(dropdown.findData(QVariant(prefs['gc_site_settings']['Default']))) + else: + self.gc_dropdowns[site] = dropdown if site in prefs['gc_site_settings']: dropdown.setCurrentIndex(dropdown.findData(QVariant(prefs['gc_site_settings'][site]))) diff --git a/calibre-plugin/ffdl_plugin.py b/calibre-plugin/ffdl_plugin.py index eb92fd10..d534c42b 100644 --- a/calibre-plugin/ffdl_plugin.py +++ b/calibre-plugin/ffdl_plugin.py @@ -1014,7 +1014,7 @@ class FanFictionDownLoaderPlugin(InterfaceAction): (epuburl,chaptercount) = \ get_dcsource_chaptercount(StringIO(db.format(book_id,'EPUB', index_is_id=True))) - urlchaptercount = int(story.getMetadata('numChapters')) + urlchaptercount = int(story.getMetadata('numChapters').replace(',','')) if chaptercount == urlchaptercount: if collision == UPDATE: raise NotGoingToDownload(_("Already contains %d chapters.")%chaptercount,'edit-undo.png') @@ -1601,6 +1601,8 @@ class FanFictionDownLoaderPlugin(InterfaceAction): db.commit() if 'Generate Cover' in self.gui.iactions and (book['added'] or not prefs['gcnewonly']): + + logger.debug("Do Generate Cover added:%s gcnewonly:%s"%(book['added'],prefs['gcnewonly'])) # force a refresh if generating cover so complex composite # custom columns are current and correct @@ -1632,9 +1634,11 @@ class FanFictionDownLoaderPlugin(InterfaceAction): if not setting_name and book['all_metadata']['site'] in prefs['gc_site_settings']: setting_name = prefs['gc_site_settings'][book['all_metadata']['site']] + logger.debug("Generate Cover Setting from site(%s)"%setting_name) if not setting_name and 'Default' in prefs['gc_site_settings']: setting_name = prefs['gc_site_settings']['Default'] + logger.debug("Generate Cover Setting from Default(%s)"%setting_name) if setting_name: logger.debug("Running Generate Cover with settings %s."%setting_name) diff --git a/calibre-plugin/jobs.py b/calibre-plugin/jobs.py index ca2ab21a..6f32d9fa 100644 --- a/calibre-plugin/jobs.py +++ b/calibre-plugin/jobs.py @@ -182,7 +182,7 @@ def do_download_for_worker(book,options,notification=lambda x,y:x): # update now handled by pre-populating the old images and # chapters in the adapter rather than merging epubs. - urlchaptercount = int(story.getMetadata('numChapters')) + urlchaptercount = int(story.getMetadata('numChapters').replace(',','')) (url, chaptercount, adapter.oldchapters,