inthreedee / photoprism-transfer-album

Transfer a Google Photos album to a new Photoprism album
GNU General Public License v3.0
109 stars 12 forks source link

add --metadata-name as a config #5

Closed Trenar closed 2 years ago

Trenar commented 2 years ago

I have my google account set to non-english, hence the metadata.json is called differently.

Thus, I added the --metadata-name [name] option to specify it, in order not to rename hundreds of files manually (or by script).

I tested this on my takeout data and it works like charm :-)

inthreedee commented 2 years ago

This is a really good idea! Thank you!

inthreedee commented 2 years ago

Am I right in assuming that the file will always have the .json extension regardless of what language is configured?

Trenar commented 2 years ago

Yes, I also do assume it. At least in German it's "Metadaten.json" and I don't see why Google should change the extension with the language. Therefore, I included the sanity check

inthreedee commented 2 years ago

@Trenar I made some tweaks, care to take a quick look and make sure it all looks good to you?

Mainly, I wanted to handle the case where the user could specify, for example, "Metadaten.json" or just "Metadaten" and it gets automatically figured out.

Trenar commented 2 years ago

@inthreedee Looks good and works for me. Thanks for initializing the variable; I totally forgot about it.