diff --git a/base/py/app.py b/base/py/app.py index 004e31d7..336d0f79 100644 --- a/base/py/app.py +++ b/base/py/app.py @@ -85,7 +85,7 @@ class DupeGuru(RegistrableApplication): self.results.load_from_xml(op.join(self.appdata, 'last_results.xml'), self._get_file, j) files = flatten(g[:] for g in self.results.groups) for file in j.iter_with_progress(files, 'Reading metadata %d/%d'): - file._read_all_info(sections=[IT_ATTRS, IT_EXTRA]) + file._read_all_info(attrnames=self.data.METADATA_TO_READ) def _get_display_info(self, dupe, group, delta=False): if (dupe is None) or (group is None): diff --git a/base/py/data.py b/base/py/data.py index 49f5fbf0..3b1d1017 100644 --- a/base/py/data.py +++ b/base/py/data.py @@ -53,6 +53,8 @@ COLUMNS = [ {'attr':'dupe_count','display':'Dupe Count'}, ] +METADATA_TO_READ = ['size', 'ctime', 'mtime'] + def GetDisplayInfo(dupe, group, delta): size = dupe.size ctime = dupe.ctime @@ -98,4 +100,3 @@ def GetGroupSortKey(group, key): if key == 8: return len(group) return cmp_value(getattr(group.ref, COLUMNS[key]['attr'])) - diff --git a/base/py/data_me.py b/base/py/data_me.py index ab4d9dbf..41ce0f85 100644 --- a/base/py/data_me.py +++ b/base/py/data_me.py @@ -33,6 +33,9 @@ COLUMNS = [ {'attr':'dupe_count','display':'Dupe Count'}, ] +METADATA_TO_READ = ['size', 'ctime', 'mtime', 'duration', 'bitrate', 'samplerate', 'title', 'artist', + 'album', 'genre', 'year', 'track', 'comment'] + def GetDisplayInfo(dupe, group, delta): size = dupe.size duration = dupe.duration