mirror of
https://github.com/arsenetar/dupeguru.git
synced 2025-05-08 09:49:51 +00:00
Fix empty ignore List dialog bug in PE
Re-instantiating a new scanner for PE made the ignore list dialog target the wrong ignore list. We now only instantiate a scanner once. Fixes #253
This commit is contained in:
parent
b16df32150
commit
878205fc49
@ -151,9 +151,9 @@ class DupeGuru(Broadcaster):
|
|||||||
# show_problem_dialog()
|
# show_problem_dialog()
|
||||||
# select_dest_folder(prompt: str) --> str
|
# select_dest_folder(prompt: str) --> str
|
||||||
# select_dest_file(prompt: str, ext: str) --> str
|
# select_dest_file(prompt: str, ext: str) --> str
|
||||||
|
|
||||||
# in fairware prompts, we don't mention the edition, it's too long.
|
|
||||||
PROMPT_NAME = "dupeGuru"
|
PROMPT_NAME = "dupeGuru"
|
||||||
|
SCANNER_CLASS = scanner.Scanner
|
||||||
|
|
||||||
def __init__(self, view):
|
def __init__(self, view):
|
||||||
if view.get_default(DEBUG_MODE_PREFERENCE):
|
if view.get_default(DEBUG_MODE_PREFERENCE):
|
||||||
@ -166,7 +166,7 @@ class DupeGuru(Broadcaster):
|
|||||||
os.makedirs(self.appdata)
|
os.makedirs(self.appdata)
|
||||||
self.directories = directories.Directories()
|
self.directories = directories.Directories()
|
||||||
self.results = results.Results(self)
|
self.results = results.Results(self)
|
||||||
self.scanner = scanner.Scanner()
|
self.scanner = self.SCANNER_CLASS()
|
||||||
self.options = {
|
self.options = {
|
||||||
'escape_filter_regexp': True,
|
'escape_filter_regexp': True,
|
||||||
'clean_empty_dirs': False,
|
'clean_empty_dirs': False,
|
||||||
|
@ -17,10 +17,10 @@ from .result_table import ResultTable
|
|||||||
class DupeGuru(DupeGuruBase):
|
class DupeGuru(DupeGuruBase):
|
||||||
NAME = __appname__
|
NAME = __appname__
|
||||||
METADATA_TO_READ = ['size', 'mtime', 'dimensions', 'exif_timestamp']
|
METADATA_TO_READ = ['size', 'mtime', 'dimensions', 'exif_timestamp']
|
||||||
|
SCANNER_CLASS = ScannerPE
|
||||||
|
|
||||||
def __init__(self, view):
|
def __init__(self, view):
|
||||||
DupeGuruBase.__init__(self, view)
|
DupeGuruBase.__init__(self, view)
|
||||||
self.scanner = ScannerPE()
|
|
||||||
self.scanner.cache_path = op.join(self.appdata, 'cached_pictures.db')
|
self.scanner.cache_path = op.join(self.appdata, 'cached_pictures.db')
|
||||||
|
|
||||||
def _get_dupe_sort_key(self, dupe, get_group, key, delta):
|
def _get_dupe_sort_key(self, dupe, get_group, key, delta):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user