From b3836e31b24df9dadc837cb61ae9f8563b741647 Mon Sep 17 00:00:00 2001 From: Daniel Kempkens Date: Thu, 26 Sep 2024 17:19:52 +0200 Subject: [PATCH] strip-metadata: update --- home/programs/scripts/strip-metadata | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/home/programs/scripts/strip-metadata b/home/programs/scripts/strip-metadata index 392a7bc..47742c8 100755 --- a/home/programs/scripts/strip-metadata +++ b/home/programs/scripts/strip-metadata @@ -4,11 +4,19 @@ def main [path: string] { glob $path | each { |item| match ($item | path parse | get extension | str downcase) { "jpg" | "jpeg" | "png" => { + do -i { + xattr -d com.apple.metadata:kMDItemWhereFroms $item + xattr -d com.apple.metadata:kMDItemComment $item + } exiftool -all= -overwrite_original_in_place $item }, "mp4" => { let tmp_item = $"($item)_out.mp4" + do -i { + xattr -d com.apple.metadata:kMDItemWhereFroms $item + xattr -d com.apple.metadata:kMDItemComment $item + } ffmpeg -i $item -map_metadata -1 -c:v copy -c:a copy $tmp_item rm $item mv $tmp_item $item