Created
February 22, 2024 21:16
-
-
Save lukeross/448902ba8d868c2925f41710b3e034d7 to your computer and use it in GitHub Desktop.
Backfill Shotwell exposure _time for WhatsApp photos and videos
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* WhatsApp photos in shotwell don't get an exposure time set, but it can be backfilled from the filename | |
* sqlite3 .local/share/shotwell/photo.db | |
*/ | |
update videotable set exposure_time=unixepoch(substring(filename, -19, 4)||"-"||substring(filename, -15, 2)||"-"||substring(filename, -13, 2)||"T00:00:00") where filename like "%VID-%-WA%.mp4" and exposure_time=0; | |
update phototable set exposure_time=unixepoch(substring(filename, -19, 4)||"-"||substring(filename, -15, 2)||"-"||substring(filename, -13, 2)||"T00:00:00") where filename like "%IMG-%-WA%.jpg" and exposure_time=0; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment