resonite-photoexif: fix

This commit is contained in:
yosh 2024-01-25 00:44:20 -05:00
parent e414df3deb
commit 93092ab241
1 changed files with 4 additions and 2 deletions

View File

@ -26,7 +26,9 @@ for resrec; do
# asset uri stuff
asseturi="$(jq -r '.assetUri | sub("resdb:///(?<x>[^.]+).*";"https://assets.resonite.com/\(.x)")' < "$tmp_recuri")"
tmp_json="$(mktemp)"
curl -s "$asseturi" | tail -c +10 | brotli -d | bson2 print > "$tmp_json"
# TODO: suck it up and make my own fucking bson->json thing so I can make this actually good
# for now this works. ew.
curl -s "$asseturi" | tail -c +10 | brotli -d | bson2 print | tr -d '\n' > "$tmp_json"
# save the image itself
imguri="$(jq -r '.Object.Children[0].Components.Data.[] |
@ -90,5 +92,5 @@ Present Users: $meta_presentusers" "$tmpfile" \
done
# note: when converting to png then jxl, sometimes tags get fucked up. do this
# alternatively: use vips pngsave instead of imagemagick
# for i in *.jxl; do exiftool -tagsfromfile "${i%.jxl}.webp" -usercomment -datetimeoriginal -m "$i"; done