1
0
mirror of https://github.com/arsenetar/dupeguru.git synced 2026-01-22 14:41:39 +00:00

Straightened out the blocks cache. Instead of having a single global threaded block cache in the app, there's just a cache path, and non-threaded caches are created when needed. Also, made Cache.clear() more robust (it will clear the cache even if the db is corrupted).

This commit is contained in:
Virgil Dupras
2010-01-14 16:14:26 +01:00
parent 06607aabb2
commit fc76a843d5
8 changed files with 58 additions and 45 deletions

View File

@@ -65,7 +65,7 @@ class DupeGuru(DupeGuruBase):
def _setup(self):
self.scanner = ScannerPE()
self.directories.fileclasses = [File]
self.scanner.cached_blocks = Cache(op.join(self.appdata, 'cached_pictures.db'))
self.scanner.cache_path = op.join(self.appdata, 'cached_pictures.db')
DupeGuruBase._setup(self)
def _update_options(self):

View File

@@ -22,6 +22,6 @@ class MainWindow(MainWindowBase):
title = "Clear Picture Cache"
msg = "Do you really want to remove all your cached picture analysis?"
if self._confirm(title, msg, QMessageBox.No):
self.app.scanner.cached_blocks.clear()
self.app.scanner.clear_picture_cache()
QMessageBox.information(self, title, "Picture cache cleared.")