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:
@@ -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):
|
||||
|
||||
@@ -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.")
|
||||
|
||||
Reference in New Issue
Block a user