This commit is contained in:
Andreas Balogh
2023-04-10 21:13:53 +02:00
parent 219469925d
commit 0e4999b6f3
4 changed files with 108 additions and 10 deletions

View File

@@ -19,7 +19,7 @@ DRY_RUN = False
fileidx = defaultdict(int)
CAMERAS = ("GoPro Hero3+", "Ricoh Theta V", "Ricoh Theta S", "Sony a5100", "Sony a65", "Sony a68", "Sony TRV-25E", "Fuji Finepix Real 3D W3", "DJI Mini 2", "Mobile Media")
CAMERAS = ("GoPro Hero3+", "Ricoh Theta V", "Ricoh Theta S", "Sony a5100", "Sony a65", "Sony a68", "Sony TRV-25E", "Fuji Finepix Real 3D W3", "DJI Mini 2", "Samsung Galaxy A40", "Samsung Galaxy A41")
def recurse(dir, md, camera=None):
@@ -45,7 +45,7 @@ def recurse(dir, md, camera=None):
author = "ab"
mtime = fp.stat().st_mtime
rawdt = dt.datetime.fromtimestamp(mtime)
if fp.suffix.lower() == ".jpg":
if fp.suffix.lower() in [".jpg"]:
try:
exif_dict = piexif.load(str(fp))
idto = exif_dict["Exif"][piexif.ExifIFD.DateTimeOriginal].decode("ascii")
@@ -56,8 +56,8 @@ def recurse(dir, md, camera=None):
try:
model = exif_dict["0th"][piexif.ImageIFD.Model].decode("ascii")
except:
print(exif_dict)
model = None
pass
use_camera = False
if model == 'Canon EOS 5D':
print(f"{fp.name} scanned photo, use directory date")
@@ -69,6 +69,13 @@ def recurse(dir, md, camera=None):
author = "jb"
if model == 'ASUS_Z00ED':
author = "sb"
if model == 'SM-A405FN':
author = "ab"
if model == 'SM-A415F' or camera == "Samsung Galaxy A41":
author = "kb"
elif fp.suffix.lower() == ".heic":
use_camera = False
author = "kb"
elif fp.suffix.upper() == ".ARW":
use_camera = False
elif fp.suffix.upper() == ".MRW":