'Clear the dirtied indicator for the books. This is used when fetching
metadata, creating an OPF, and writing a file are separated into steps.
The last step is clearing the indicator'

def clear_dirtied(self, book_id, sequence):

    with self.dirtied_lock:
        dc_sequence = self.dirtied_cache.get(book_id, None)
        if ((dc_sequence is None) or (sequence is None) or (dc_sequence == sequence)):
            self.conn.execute('DELETE    FROM    metadata_dirtied    WHERE    book=?', (book_id,))
            self.conn.commit()
            try:
                del self.dirtied_cache[book_id]
            except:
                pass
        elif (dc_sequence is not None):
            pass
