mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-06-23 15:30:45 -04:00
IGN:...
This commit is contained in:
parent
c4f554dc0e
commit
ceb3378d8c
@ -207,9 +207,9 @@ class MetaInformation(object):
|
||||
title = mi.title
|
||||
authors = mi.authors
|
||||
self.title = title
|
||||
self.author = list(authors) # Needed for backward compatibility
|
||||
self.author = list(authors) if authors else []# Needed for backward compatibility
|
||||
#: List of strings or []
|
||||
self.authors = list(authors)
|
||||
self.authors = list(authors) if authors else []
|
||||
self.tags = getattr(mi, 'tags', [])
|
||||
#: mi.cover_data = (ext, data)
|
||||
self.cover_data = getattr(mi, 'cover_data', (None, None))
|
||||
|
@ -15,6 +15,7 @@ from calibre import terminal_controller, preferred_encoding
|
||||
from calibre.utils.config import OptionParser, prefs
|
||||
try:
|
||||
from calibre.utils.single_qt_application import send_message
|
||||
send_message
|
||||
except:
|
||||
send_message = None
|
||||
from calibre.ebooks.metadata.meta import get_metadata
|
||||
|
@ -622,11 +622,7 @@ class LibraryDatabase2(LibraryDatabase):
|
||||
if title:
|
||||
if not isinstance(title, unicode):
|
||||
title = title.decode(preferred_encoding, 'replace')
|
||||
tf = FIELD_MAP['title']
|
||||
q = title.lower()
|
||||
for record in self.data._data:
|
||||
if record is not None and record[tf].lower() == q:
|
||||
return True
|
||||
return bool(self.conn.get('SELECT id FROM books where title=?', (title,), all=False))
|
||||
return False
|
||||
|
||||
def has_cover(self, index, index_is_id=False):
|
||||
|
Loading…
x
Reference in New Issue
Block a user