Fix regression that broke metadata retrieval in 0.6.22

This commit is contained in:
Kovid Goyal 2009-11-13 18:37:00 -07:00
parent 6fd0a3100b
commit a4166b983c
2 changed files with 7 additions and 4 deletions

View File

@ -60,9 +60,7 @@ class MetadataSource(Plugin):
class GoogleBooks(MetadataSource): class GoogleBooks(MetadataSource):
name = 'Google Books' name = 'Google Books'
description = _('Downloads metadata from Google Books')
def is_ok(self):
return bool(self.site_customization)
def fetch(self): def fetch(self):
from calibre.ebooks.metadata.google_books import search from calibre.ebooks.metadata.google_books import search
@ -78,6 +76,7 @@ class GoogleBooks(MetadataSource):
class ISBNDB(MetadataSource): class ISBNDB(MetadataSource):
name = 'IsbnDB' name = 'IsbnDB'
description = _('Downloads metadata from isbndb.com')
def fetch(self): def fetch(self):
if not self.site_customization: if not self.site_customization:
@ -116,6 +115,7 @@ class Amazon(MetadataSource):
name = 'Amazon' name = 'Amazon'
metadata_type = 'social' metadata_type = 'social'
description = _('Downloads social metadata from amazon.com')
def fetch(self): def fetch(self):
if not self.isbn: if not self.isbn:

View File

@ -101,7 +101,10 @@ class FetchMetadata(QDialog, Ui_FetchMetadata):
self.timeout = timeout self.timeout = timeout
QObject.connect(self.fetch, SIGNAL('clicked()'), self.fetch_metadata) QObject.connect(self.fetch, SIGNAL('clicked()'), self.fetch_metadata)
self.key.setText(get_isbndb_key()) isbndb_key = get_isbndb_key()
if not isbndb_key:
isbndb_key = ''
self.key.setText(isbndb_key)
self.setWindowTitle(title if title else _('Unknown')) self.setWindowTitle(title if title else _('Unknown'))
self.isbn = isbn self.isbn = isbn