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
|
title = mi.title
|
||||||
authors = mi.authors
|
authors = mi.authors
|
||||||
self.title = title
|
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 []
|
#: List of strings or []
|
||||||
self.authors = list(authors)
|
self.authors = list(authors) if authors else []
|
||||||
self.tags = getattr(mi, 'tags', [])
|
self.tags = getattr(mi, 'tags', [])
|
||||||
#: mi.cover_data = (ext, data)
|
#: mi.cover_data = (ext, data)
|
||||||
self.cover_data = getattr(mi, 'cover_data', (None, None))
|
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
|
from calibre.utils.config import OptionParser, prefs
|
||||||
try:
|
try:
|
||||||
from calibre.utils.single_qt_application import send_message
|
from calibre.utils.single_qt_application import send_message
|
||||||
|
send_message
|
||||||
except:
|
except:
|
||||||
send_message = None
|
send_message = None
|
||||||
from calibre.ebooks.metadata.meta import get_metadata
|
from calibre.ebooks.metadata.meta import get_metadata
|
||||||
|
@ -622,11 +622,7 @@ class LibraryDatabase2(LibraryDatabase):
|
|||||||
if title:
|
if title:
|
||||||
if not isinstance(title, unicode):
|
if not isinstance(title, unicode):
|
||||||
title = title.decode(preferred_encoding, 'replace')
|
title = title.decode(preferred_encoding, 'replace')
|
||||||
tf = FIELD_MAP['title']
|
return bool(self.conn.get('SELECT id FROM books where title=?', (title,), all=False))
|
||||||
q = title.lower()
|
|
||||||
for record in self.data._data:
|
|
||||||
if record is not None and record[tf].lower() == q:
|
|
||||||
return True
|
|
||||||
return False
|
return False
|
||||||
|
|
||||||
def has_cover(self, index, index_is_id=False):
|
def has_cover(self, index, index_is_id=False):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user