1
0
mirror of https://github.com/arsenetar/dupeguru.git synced 2026-01-22 06:37:17 +00:00

match all orientations (#1127)

* match all orientations

* use rotation as option

---------

Co-authored-by: Andrew Senetar <arsenetar@gmail.com>
Co-authored-by: Luke <byunghun.hyun26@gmail.com>
This commit is contained in:
Bruno Cabral
2024-02-19 07:19:33 -08:00
committed by GitHub
parent 70d956b4f8
commit 85a4557525
13 changed files with 78 additions and 35 deletions

View File

@@ -192,6 +192,7 @@ class DupeGuru(QObject):
scanned_tags.add("year")
self.model.options["scanned_tags"] = scanned_tags
self.model.options["match_scaled"] = self.prefs.match_scaled
self.model.options["match_rotated"] = self.prefs.match_rotated
self.model.options["include_exists_check"] = self.prefs.include_exists_check
self.model.options["rehash_ignore_mtime"] = self.prefs.rehash_ignore_mtime

View File

@@ -21,6 +21,8 @@ class PreferencesDialog(PreferencesDialogBase):
self.widgetsVLayout.addLayout(self.filterHardnessHLayout)
self._setupAddCheckbox("matchScaledBox", tr("Match pictures of different dimensions"))
self.widgetsVLayout.addWidget(self.matchScaledBox)
self._setupAddCheckbox("matchRotatedBox", tr("Match pictures of different rotations"))
self.widgetsVLayout.addWidget(self.matchRotatedBox)
self._setupAddCheckbox("mixFileKindBox", tr("Can mix file kind"))
self.widgetsVLayout.addWidget(self.mixFileKindBox)
self._setupAddCheckbox("useRegexpBox", tr("Use regular expressions when filtering"))
@@ -57,6 +59,7 @@ show scrollbars to span the view around"
def _load(self, prefs, setchecked, section):
setchecked(self.matchScaledBox, prefs.match_scaled)
setchecked(self.matchRotatedBox, prefs.match_rotated)
# Update UI state based on selected scan type
scan_type = prefs.get_scan_type(AppMode.PICTURE)
@@ -67,5 +70,6 @@ show scrollbars to span the view around"
def _save(self, prefs, ischecked):
prefs.match_scaled = ischecked(self.matchScaledBox)
prefs.match_rotated = ischecked(self.matchRotatedBox)
prefs.details_dialog_override_theme_icons = ischecked(self.details_dialog_override_theme_icons)
prefs.details_dialog_viewers_show_scrollbars = ischecked(self.details_dialog_viewers_show_scrollbars)

View File

@@ -225,6 +225,7 @@ class Preferences(PreferencesBase):
self.scan_tag_genre = get("ScanTagGenre", self.scan_tag_genre)
self.scan_tag_year = get("ScanTagYear", self.scan_tag_year)
self.match_scaled = get("MatchScaled", self.match_scaled)
self.match_rotated = get("MatchRotated", self.match_rotated)
def reset(self):
self.filter_hardness = 95
@@ -277,6 +278,7 @@ class Preferences(PreferencesBase):
self.scan_tag_genre = False
self.scan_tag_year = False
self.match_scaled = False
self.match_rotated = False
def _save_values(self, settings):
set_ = self.set_value
@@ -330,6 +332,7 @@ class Preferences(PreferencesBase):
set_("ScanTagGenre", self.scan_tag_genre)
set_("ScanTagYear", self.scan_tag_year)
set_("MatchScaled", self.match_scaled)
set_("MatchRotated", self.match_rotated)
# scan_type is special because we save it immediately when we set it.
def get_scan_type(self, app_mode):