boredazfcuk / docker-icloudpd

An Alpine Linux container for the iCloud Photos Downloader command line utility
1.75k stars 165 forks source link

Delete photo that is removed from iCloud #437

Closed thedinz closed 7 months ago

thedinz commented 10 months ago

I have toggled various delete options on and off in the config but when icloudpd runs, it will not remove photos I have removed from iCloud, which is actually what im looking for, more of a true sync scenario.

I thought this is the way it worked or COULD work and maybe it does but im not understanding the correct settings to enabled for it to work this way. I am running this on unraid if that matters.

boredazfcuk commented 10 months ago

The icloudpd utility is not a sync tool. It's more like a backup tool.

Although, it does support removal of photos found in the 'Recently Deleted' folder. If it find a file in there, it will remove that file from your photo stream. To enable this functionality, just set auto_delete=true in your icloudpd.conf file.

phurth commented 9 months ago

Greetings! I have icloudpd successfully backing up my iCloud library, however auto_delete doesn't seem to be working. There are a few items in Recently Deleted and after running a few times, these are not being deleted. Nothing in the log indicated that Recently Deleted is even being looked at. One note - in the Mac Photos app there was a setting to protect hidden and recently deleted items. I disabled this thinking that might be the cause, but nothing changed.

Log:

2023/12/20 19:20:21
stdout
2023-12-20 19:20:21 INFO     Next synchronisation at 19:14:38
2023/12/20 19:20:21
stdout
2023-12-20 19:20:21 INFO     Total time taken: 00:05:43
2023/12/20 19:20:21
stdout
2023-12-20 19:20:21 INFO     Synchronisation ended at 19:20:21
2023/12/20 19:20:21
stdout
2023-12-20 19:20:21 INFO     Days remaining until expiration: 89
2023/12/20 19:20:21
stdout
2023-12-20 19:20:21 INFO     Multifactor authentication cookie expires: 2024-03-19 @ 00:05:21
2023/12/20 19:20:21
stdout
2023-12-20 19:20:21 INFO     Web cookie expires: 2024-02-18 @ 00:05:05
2023/12/20 19:20:21
stdout
2023-12-20 19:20:21 INFO     No new files detected. Nothing to download
2023/12/20 19:20:21
stdout
2023-12-20 19:20:21 INFO     Check successful
2023/12/20 19:14:38
stdout
2023-12-20 19:14:38 INFO     Generating list of files in iCloud. This may take a long time if you have a large photo collection. Please be patient.

Compose:

version: "3.8"

volumes:
   config:
      name: icloudpd_config

services:
   icloudpd:
      environment:
            - user={OMITTED}
            - user_id=1026
            - group=users
            - group_id=100
            - apple_id={OMITTED}
            - authentication_type=2FA
            - 'folder_structure={:%Y/%m/%d}'
            - notification_days=7
            - synchronisation_interval=86400
            - TZ=America/Chicago
            - 'download_path=/iCloud'
            - skip_check=false
            - auto_delete=true
            - synology_photos_app_fix=true
            - synology_ignore_path=true
            - delete_empty_directories:true
            - notification_type=Webhook
            - webhook_server={IP OMITTED}
            - webhook_port=8123
            - 'webhook_path=/api/webhook/'
            - 'webhook_id=-{ID OMITTED}'

      image: boredazfcuk/icloudpd
      restart: always
      volumes:
         - '/volume1/docker/icloudpd:/config'
         - '/volume1/photo/iCloud:/iCloud'
thedinz commented 9 months ago

Same here and it used to, seems to be after the recent fix

thedinz commented 9 months ago

I can confirm this still is not working for me, anyone else? Files do not delete anymore.

boredazfcuk commented 9 months ago

2023-12-20 19:20:21 INFO No new files detected. Nothing to download

If there is nothing to download, then the container skips the synchronisation run. Add a new photo to the Photo Stream and restart the container. It should download the new file, then process the 'Recently Deleted' folder and remove anything it finds.

phurth commented 9 months ago

2023-12-20 19:20:21 INFO No new files detected. Nothing to download

If there is nothing to download, then the container skips the synchronisation run. Add a new photo to the Photo Stream and restart the container. It should download the new file, then process the 'Recently Deleted' folder and remove anything it finds.

I see - so if I understand correctly, deletes only get checked and processed if there is at least one new item to download first. Makes sense, thanks for the clarification.