This commit is contained in:
Kovid Goyal 2010-09-06 12:02:30 -06:00
commit 63bbb17dee
3 changed files with 4 additions and 1 deletions

View File

@ -522,6 +522,7 @@ class Main(MainWindow, MainWindowMixin, DeviceMixin, # {{{
def shutdown(self, write_settings=True):
self.library_view.model().db.clean()
for action in self.iactions.values():
if not action.shutting_down():
return

View File

@ -324,6 +324,7 @@ def do_remove(db, ids):
db.delete_book(y)
send_message()
db.clean()
def remove_option_parser():
return get_parser(_(
@ -449,6 +450,7 @@ def command_show_metadata(args, dbpath):
def do_set_metadata(db, id, stream):
mi = OPF(stream)
db.set_metadata(id, mi)
db.clean()
do_show_metadata(db, id, False)
send_message()

View File

@ -332,7 +332,7 @@ class LibraryDatabase2(LibraryDatabase, SchemaUpgrade, CustomColumns):
for prop in ('author_sort', 'authors', 'comment', 'comments', 'isbn',
'publisher', 'rating', 'series', 'series_index', 'tags',
'title', 'timestamp', 'uuid', 'pubdate'):
'title', 'timestamp', 'uuid', 'pubdate', 'ondevice'):
setattr(self, prop, functools.partial(get_property,
loc=self.FIELD_MAP['comments' if prop == 'comment' else prop]))
setattr(self, 'title_sort', functools.partial(get_property,