mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Merge from trunk
This commit is contained in:
commit
6a4c47ca61
@ -53,7 +53,7 @@ class Worker(Thread):
|
||||
# All of these just affect the DB, so we can tolerate a total rollback
|
||||
for id in self.ids:
|
||||
if do_auto_author:
|
||||
x = self.db.author_sort_from_book(id, index_is_id=True, commit=False)
|
||||
x = self.db.author_sort_from_book(id, index_is_id=True)
|
||||
if x:
|
||||
self.db.set_author_sort(id, x, notify=False, commit=False)
|
||||
|
||||
@ -76,8 +76,8 @@ class Worker(Thread):
|
||||
self.db.remove_format(id, remove_format, index_is_id=True, notify=False, commit=False)
|
||||
|
||||
if do_remove_conv:
|
||||
self.db.delete_conversion_options(id, 'PIPE')
|
||||
self.db.doit.commit()
|
||||
self.db.delete_conversion_options(id, 'PIPE', commit=False)
|
||||
self.db.commit()
|
||||
|
||||
for w in self.cc_widgets:
|
||||
w.commit(self.ids)
|
||||
|
@ -1080,9 +1080,11 @@ ALTER TABLE books ADD COLUMN isbn TEXT DEFAULT "" COLLATE NOCASE;
|
||||
return cPickle.loads(str(data))
|
||||
return None
|
||||
|
||||
def delete_conversion_options(self, id, format):
|
||||
def delete_conversion_options(self, id, format, commit=True):
|
||||
self.conn.execute('DELETE FROM conversion_options WHERE book=? AND format=?',
|
||||
(id, format.upper()))
|
||||
if commit:
|
||||
self.conn.commit()
|
||||
|
||||
|
||||
def add_format(self, index, ext, stream, index_is_id=False):
|
||||
|
@ -1451,6 +1451,9 @@ class LibraryDatabase2(LibraryDatabase, SchemaUpgrade, CustomColumns):
|
||||
if notify:
|
||||
self.notify('metadata', ids)
|
||||
|
||||
def commit(self):
|
||||
self.conn.commit()
|
||||
|
||||
def set_tags(self, id, tags, append=False, notify=True, commit=True):
|
||||
'''
|
||||
@param tags: list of strings
|
||||
|
Loading…
x
Reference in New Issue
Block a user