From 9e0b36d6009413745e12d59baac2abe57d63a89a Mon Sep 17 00:00:00 2001 From: Robert Date: Wed, 30 Apr 2025 17:15:00 -0400 Subject: [PATCH] Simplified defs for same_cams... --- dedup.py | 21 +++++++-------------- 1 file changed, 7 insertions(+), 14 deletions(-) diff --git a/dedup.py b/dedup.py index e8a8d07..6142660 100644 --- a/dedup.py +++ b/dedup.py @@ -56,23 +56,18 @@ def handle_GPS(location1, location2): point2 = (latitude2, longitude2) camera1 = (camera_info1['Make'], camera_info1['Model']) camera2 = (camera_info2['Make'], camera_info2['Model']) + same_cams = is_same_camera(camera1, camera2) the_location = is_same_location(point1, point2) match the_location: case True: print("Images are both from same exact Location") - if is_same_camera(camera1, camera2): + if same_cams: print("Cameras are the same.") delibs.exit_timer(5) - else: - print("Different Cameras detected.") - not_a_dup() - + case False: print("Images are from different Locations") - if is_same_camera(camera1, camera2) == False: - print("Different Cameras detected.") - not_a_dup() case float() if isinstance(the_location, float): # Checks if it's a float print(f"Images distance in feet: {the_location:.2f}") @@ -81,12 +76,10 @@ def handle_GPS(location1, location2): if is_same_camera(camera1, camera2): print("Cameras are the same.") delibs.exit_timer(6) - else: - print("Different Cameras detected.") - not_a_dup() - elif is_same_camera(camera1, camera2) == False: - print("Different Cameras detected.") - not_a_dup() + + if same_cams == False: + print("Different Cameras detected.") + not_a_dup() def is_module_imported(module_name): return module_name in sys.modules