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
1.99k stars 94 forks source link

Possible to use —download-missing without exporting? #1662

Open stibbzy opened 3 weeks ago

stibbzy commented 3 weeks ago

I have a very simple use case that I’m wondering if this tool will support. My MacBook battery is dead and I must always have it plugged in. Unfortunately, the Photos app sees this as a low power situation and won’t sync with iCloud automatically. I can force a sync for one hour by clicking a prompt in the Photos app, but I want to automate this.

Is it possible to use this tool’s —download-missing feature to force an iCloud sync, but not actually export any photos?

Thanks!

RhetTbull commented 3 weeks ago

Yes, there's a script in the examples directory that does just this. You can run it directly without first downloading it via:

osxphotos run https://raw.githubusercontent.com/RhetTbull/osxphotos/main/examples/force_download.py

It's not guaranteed that Photos won't then immediately delete the download image which it might do if you have "optimize Mac storage" enabled.

stibbzy commented 3 weeks ago

Ahh thank you so much! I’ll give it a go! I don’t have optimised storage on.

stibbzy commented 3 weeks ago

@RhetTbull I had a chance to try this last night. While the script ran, i watched the Photos app start syncing with iCloud, but then immediately stop and return to saying syncing was paused due to low power. The script kept going, and said it downloaded 147 photos, but there was also lots of messages of skipped photos. No additional photos were displayed in the Photos app. I've made sure that Terminal has permissions for Photos in the Security and Privacy settings. Here's the output:

Downloading photo D5C1FB3A-0876-4851-BD25-9578BDBB8D6D.JPG
Skipping missing original photo D5C1FB3A-0876-4851-BD25-9578BDBB8D6D.JPG (F4BA9BAB-EB27-4B77-B13B-244EA7247CFD)
Downloading photo C1EE77B5-3A91-4C80-8C67-D74EEEABB3FA.JPG
Skipping missing original photo C1EE77B5-3A91-4C80-8C67-D74EEEABB3FA.JPG (533B5A1A-CC55-4DFC-A1B1-4A31EF784CC1)
Downloading photo IMG_3520.jpeg
Skipping missing original photo IMG_3520.jpeg (BEC441F6-FDE3-4D98-8A9E-9B44F1F2F9ED)
Downloading photo 191C9AEA-6516-4219-94FA-A7A7B7FDFAAF.JPG
Skipping missing original photo 191C9AEA-6516-4219-94FA-A7A7B7FDFAAF.JPG (3FEA63AE-DE78-4406-89C6-578B5F24DBEA)
Downloaded 147 photos
RhetTbull commented 3 weeks ago

Sorry, not sure what the issue is. If Photos fails to download the photo then osxphotos will skip it and report it missing. Perhaps try running it again? How many missing photos are you expecting (that is, photos left to download from the cloud)?

stibbzy commented 3 weeks ago

There should be a couple of hundred. I did try it again, but unfortunately I had the same result. I might just have to purchase a used Mac mini or something to overcome this dead battery issue!