corrected tags

This commit is contained in:
Andreas Balogh
2023-08-31 13:53:50 +02:00
parent 5df836529b
commit d55f341b1a
2 changed files with 10 additions and 10 deletions

View File

@@ -23,7 +23,9 @@ def rename(old, new):
print(f"skipped {old.name}, {new.name}, already exists")
# src = Path(r'D:\Videos')
src = Path(r"D:\MediaLibrary\Pictures\2023\20230819 Urlaub Nordkapp")
# src = Path(r"D:\MediaLibrary\Pictures\2023\20230819 Urlaub Nordkapp")
src = Path(r"U:\shared\Nordkapp\Processed")
for raw in src.glob("*.mp4"):
mo = re.match("(?P<author>[^-]*)-(?P<dt>\S{8}-\S{6})-(?P<model>[^-]*)(-\S+)?.mp4", raw.name)
@@ -35,9 +37,9 @@ for raw in src.glob("*.mp4"):
mtime = rawdt.timestamp()
atime = raw.stat().st_atime
print(f"setting {raw.name} to {rawdt}")
exifdt = (rawdt+dt.timedelta(hours=2)).strftime('%Y:%m:%d %H:%M:%S')
print(f'exiftool "-AllDates={exifdt}" "{raw}"')
subprocess.run(["exiftool", f"-AllDates={exifdt}", f"{raw}"])
# exifdt = (rawdt+dt.timedelta(hours=2)).strftime('%Y:%m:%d %H:%M:%S')
# print(f'exiftool "-AllDates={exifdt}" "{raw}"')
# subprocess.run(["exiftool", f"-AllDates={exifdt}", f"{raw}"])
if not DRY_RUN:
os.utime(raw, (atime, mtime))
# fn = f"{md['author'].lower()}-{md['dt']}-{md['model']}{raw.suffix}"