mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
...
This commit is contained in:
parent
9084f0be45
commit
385986fe4b
@ -357,11 +357,8 @@ def identify(log, abort, # {{{
|
|||||||
if r.plugin.has_html_comments and r.comments:
|
if r.plugin.has_html_comments and r.comments:
|
||||||
r.comments = html2text(r.comments)
|
r.comments = html2text(r.comments)
|
||||||
|
|
||||||
dummy = Metadata(_('Unknown'))
|
|
||||||
max_tags = msprefs['max_tags']
|
max_tags = msprefs['max_tags']
|
||||||
for r in results:
|
for r in results:
|
||||||
for f in msprefs['ignore_fields']:
|
|
||||||
setattr(r, f, getattr(dummy, f))
|
|
||||||
r.tags = r.tags[:max_tags]
|
r.tags = r.tags[:max_tags]
|
||||||
|
|
||||||
return results
|
return results
|
||||||
|
@ -24,6 +24,7 @@ from calibre.gui2.metadata.basic_widgets import (TitleEdit, AuthorsEdit,
|
|||||||
from calibre.gui2.metadata.single_download import FullFetch
|
from calibre.gui2.metadata.single_download import FullFetch
|
||||||
from calibre.gui2.custom_column_widgets import populate_metadata_page
|
from calibre.gui2.custom_column_widgets import populate_metadata_page
|
||||||
from calibre.utils.config import tweaks
|
from calibre.utils.config import tweaks
|
||||||
|
from calibre.ebooks.metadata.book.base import Metadata
|
||||||
|
|
||||||
class MetadataSingleDialogBase(ResizableDialog):
|
class MetadataSingleDialogBase(ResizableDialog):
|
||||||
|
|
||||||
@ -314,7 +315,11 @@ class MetadataSingleDialogBase(ResizableDialog):
|
|||||||
ret = d.start(title=self.title.current_val, authors=self.authors.current_val,
|
ret = d.start(title=self.title.current_val, authors=self.authors.current_val,
|
||||||
identifiers=self.identifiers.current_val)
|
identifiers=self.identifiers.current_val)
|
||||||
if ret == d.Accepted:
|
if ret == d.Accepted:
|
||||||
|
from calibre.ebooks.metadata.sources.base import msprefs
|
||||||
mi = d.book
|
mi = d.book
|
||||||
|
dummy = Metadata(_('Unknown'))
|
||||||
|
for f in msprefs['ignore_fields']:
|
||||||
|
setattr(mi, f, getattr(dummy, f))
|
||||||
if mi is not None:
|
if mi is not None:
|
||||||
self.update_from_mi(mi)
|
self.update_from_mi(mi)
|
||||||
if d.cover_pixmap is not None:
|
if d.cover_pixmap is not None:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user