RhetTbull / osxphotos

Python app to work with pictures and associated metadata from Apple Photos on macOS. Also includes a package to provide programmatic access to the Photos library, pictures, and metadata.
MIT License
2.17k stars 100 forks source link

osxphotos exportdb reports wrong version with `--version` #1392

Open RhetTbull opened 10 months ago

RhetTbull commented 10 months ago

Thank you! I was thinking about this and was just starting to look at the changes since v64.x. Noticed in v67.0 - " .. Export database now stores history of exported photos and videos which can be used with osxphotos exportdb --history to see why a specific file or UUID was exported or skipped and the history of the file ..". Kinda figured it might be related to something like an covering index missing.

I agree with your thinking re: leaving the history feature enabled by default with the option to disable it. This leaves the trade-off decision in the end users hands.

Appreciate the time you are taking on this.

FYI: I re-ran my export overnight using v0.67.3 and noticed that the version reported for the exportdb --version is 67.2 vs 67.3 as per below.

❯ osxphotos -v
osxphotos, version 0.67.3
Python 3.11.7 (main, Dec  4 2023, 18:10:11) [Clang 15.0.0 (clang-1500.1.0.2.5)]
macOS 14.2.1, arm64

❯ osxphotos exportdb --version .osxphotos_export.db
osxphotos version: 0.67.2, export database version: 9.0

Originally posted by @rajscode in https://github.com/RhetTbull/osxphotos/discussions/1083#discussioncomment-8183116

RhetTbull commented 10 months ago

This is the correct behavior but maybe needs better explanation in the output. The version stored in the export database is the version of osxphotos running at the time the export database was migrated.