mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
IGN:...
This commit is contained in:
parent
ca20f6c4e4
commit
5137e4f176
@ -258,7 +258,7 @@ class BookList(_BookList):
|
||||
if book is not None:
|
||||
self.remove_book(name)
|
||||
node = self.document.createElement(self.prefix + "text")
|
||||
mime = MIME_MAP[name[name.rfind(".")+1:]]
|
||||
mime = MIME_MAP[name[name.rfind(".")+1:].lower()]
|
||||
cid = self.max_id()+1
|
||||
sourceid = str(self[0].sourceid) if len(self) else "1"
|
||||
attrs = {
|
||||
|
@ -184,7 +184,7 @@ class BookList(_BookList):
|
||||
self.remove_book(name)
|
||||
|
||||
node = self.document.createElement(self.prefix + "text")
|
||||
mime = MIME_MAP[name.rpartition('.')[-1]]
|
||||
mime = MIME_MAP[name.rpartition('.')[-1].lower()]
|
||||
cid = self.max_id()+1
|
||||
sourceid = str(self[0].sourceid) if len(self) else "1"
|
||||
attrs = {
|
||||
|
@ -128,7 +128,7 @@ class BooksModel(QAbstractTableModel):
|
||||
for row in rows:
|
||||
if self.cover_cache:
|
||||
id = self.db.id(row)
|
||||
self.cover_cache.refresh(id)
|
||||
self.cover_cache.refresh([id])
|
||||
if row == current_row:
|
||||
self.emit(SIGNAL('new_bookdisplay_data(PyQt_PyObject)'),
|
||||
self.get_book_display_info(row))
|
||||
|
@ -139,7 +139,7 @@ class CoverCache(QThread):
|
||||
self.cache_lock.unlock()
|
||||
self.load_queue_lock.lockForWrite()
|
||||
for id in ids:
|
||||
self.load_queue.append_left(id)
|
||||
self.load_queue.appendleft(id)
|
||||
self.load_queue_lock.unlock()
|
||||
|
||||
class Concatenate(object):
|
||||
|
@ -73,6 +73,10 @@ MAP = {
|
||||
u"ь" : u"'",
|
||||
} #: Translation table
|
||||
|
||||
for c in string.whitespace:
|
||||
MAP[c] = ' '
|
||||
PAT = re.compile('['+u''.join(MAP.keys())+']')
|
||||
|
||||
def ascii_filename(orig):
|
||||
orig = PAT.sub(lambda m:MAP[m.group()], orig)
|
||||
buf = []
|
||||
|
Loading…
x
Reference in New Issue
Block a user