mirror of
https://github.com/arsenetar/dupeguru.git
synced 2026-02-03 20:01:38 +00:00
dgpe: adjusted to the MatchFactory removal.
--HG-- extra : convert_revision : svn%3Ac306627e-7827-47d3-bdf0-9a457c9553a1/trunk%40193
This commit is contained in:
10
pe/qt/app.py
10
pe/qt/app.py
@@ -17,7 +17,7 @@ from hsutil.str import get_file_ext
|
||||
|
||||
from dupeguru_pe import data as data_pe
|
||||
from dupeguru_pe.cache import Cache
|
||||
from dupeguru_pe.matchbase import AsyncMatchFactory
|
||||
from dupeguru_pe.scanner import ScannerPE
|
||||
|
||||
from block import getblocks
|
||||
from base.app import DupeGuru as DupeGuruBase
|
||||
@@ -63,15 +63,15 @@ class DupeGuru(DupeGuruBase):
|
||||
DupeGuruBase.__init__(self, data_pe, appid=5)
|
||||
|
||||
def _setup(self):
|
||||
self.scanner.match_factory = AsyncMatchFactory()
|
||||
self.scanner = ScannerPE()
|
||||
self.directories.dirclass = Directory
|
||||
self.scanner.match_factory.cached_blocks = Cache(op.join(self.appdata, 'cached_pictures.db'))
|
||||
self.scanner.cached_blocks = Cache(op.join(self.appdata, 'cached_pictures.db'))
|
||||
DupeGuruBase._setup(self)
|
||||
|
||||
def _update_options(self):
|
||||
DupeGuruBase._update_options(self)
|
||||
self.scanner.match_factory.match_scaled = self.prefs.match_scaled
|
||||
self.scanner.match_factory.threshold = self.prefs.filter_hardness
|
||||
self.scanner.match_scaled = self.prefs.match_scaled
|
||||
self.scanner.threshold = self.prefs.filter_hardness
|
||||
|
||||
def _create_details_dialog(self, parent):
|
||||
return DetailsDialog(parent, self)
|
||||
|
||||
@@ -23,6 +23,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.match_factory.cached_blocks.clear()
|
||||
self.app.scanner.cached_blocks.clear()
|
||||
QMessageBox.information(self, title, "Picture cache cleared.")
|
||||
|
||||
Reference in New Issue
Block a user