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

Moved DELTA_COLUMNS from app to result_table.

This commit is contained in:
Virgil Dupras
2011-11-27 13:10:35 -05:00
parent fca66d5108
commit fc5a0d914b
13 changed files with 11 additions and 18 deletions

View File

@@ -24,7 +24,6 @@ def get_delta_dimensions(value, ref_value):
class DupeGuru(DupeGuruBase):
NAME = __appname__
DELTA_COLUMNS = {'size', 'dimensions', 'mtime'}
METADATA_TO_READ = ['size', 'mtime', 'dimensions']
def __init__(self, view, appdata):
@@ -71,7 +70,7 @@ class DupeGuru(DupeGuruBase):
dupe_folder_path = getattr(dupe, 'display_folder_path', dupe.folder_path)
return str(dupe_folder_path).lower()
r = cmp_value(dupe, key)
if delta and (key in self.DELTA_COLUMNS):
if delta and (key in self.result_table.DELTA_COLUMNS):
ref_value = cmp_value(get_group().ref, key)
if key == 4: # dimensions
r = get_delta_dimensions(r, ref_value)

View File

@@ -24,3 +24,4 @@ class ResultTable(ResultTableBase):
Column('percentage', coltr("Match %"), optional=True),
Column('dupe_count', coltr("Dupe Count"), visible=False, optional=True),
]
DELTA_COLUMNS = {'size', 'dimensions', 'mtime'}