Clear the format metadata cache for a book when a format is deleted.

This commit is contained in:
Charles Haley 2011-07-01 11:07:46 +01:00
parent 137093ebb9
commit d967da0b30

View File

@ -1333,6 +1333,7 @@ class LibraryDatabase2(LibraryDatabase, SchemaUpgrade, CustomColumns):
def remove_format(self, index, format, index_is_id=False, notify=True,
commit=True, db_only=False):
id = index if index_is_id else self.id(index)
del self.format_metadata_cache[id]
name = self.conn.get('SELECT name FROM data WHERE book=? AND format=?', (id, format), all=False)
if name:
if not db_only: