immich-app / immich

High performance self-hosted photo and video management solution.
https://immich.app
GNU Affero General Public License v3.0
44.98k stars 2.18k forks source link

[BUG] Favorite status on iOS is not synced to server if the favorited items were already in the server #5082

Closed truppelito closed 4 months ago

truppelito commented 10 months ago

The bug

Recently I uploaded many items to my Immich server using the CLI. Many of those items are also present on my iPhone, some of which are favorited in the iOS Photos app.

The Immich iOS app correctly identifies the items on my iPhone that I originally uploaded using the CLI by showing a cloud checkmark icon, and does not sync them from the iPhone to the server again. The items present only on my iPhone are synced to the server, and all of this is correct behaviour.

I have noticed, however, that items that were originally uploaded using the CLI, that are also present on the iPhone, and that I have favorited on the iPhone in the past do not become favorited on the server. On the other hand, items that I had only on the iPhone (not uploaded through the CLI) and that were favorited do become favorited on the server. My guess is, since the sync from iOS never happens for the files uploaded over the CLI, the "favorited status" is never sent to the server.

In the end, out of around 180 items with favorite status on my iPhone, the Immich server only has favorite status for 4 of them. Given that the favorite status is synced under some conditions, I believe this is unexpected behaviour for the vast majority of users.

My suggestion would be to sync the favorite status from the mobile app to the server whenever the status on both sides is different. This also means that, as the user favorites and un-favorites photos on mobile over time, that status is updated on the server. Since the Immich mobile app already sends the favorite status during the first sync, if it happens, I believe this behaviour would be more consistent.

Counterpoints: if the user favorites items on the server only, my suggestion doesn't work, as this info would be reverted on the next mobile sync. Personally, this is fine, but I understand other people may feel differently. An improvement would be that the favorite status sync happens bi-directionally, which probably covers most users' needs. Another possibility: add an option to let the user decide if they want the favorite status to be synced (knowing that selecting "yes" means the sync overrides the server status with the mobile status). A third possibility: if the user decides to sync the "Favorites" album on mobile, then the favorite status of those photos (which is by definition "true") is always synced to the server (overriding the server status), but for items not in the "Favorites" album, status is not synced. A fourth option: combine the bi-directional sync with the choice of syncing favorite status or not, i.e. if the user selects "yes" to syncing, syncing happens bi-directionally, if "no" then favorite status is entirely independent and never synced between mobile and server (not even when the item is first sent from mobile to the server).

The OS that Immich Server is running on

Raspberry Pi OS

Version of Immich Server

v1.86.0

Version of Immich Mobile App

v1.86.0

Platform with the issue

Your docker-compose.yml content

(not applicable here)

Your .env content

(not applicable here)

Reproduction steps

1. Take photo on mobile
2. Favorite photo on mobile
3. Send photo to computer
4. Upload photo to Immich server using CLI or the web interface
5. Let Immich mobile app sync items, this new photo should not need to be synced
6. After sync is finished, mobile has photo with favorite status, Immich server does not

Additional information

No response

ndewijer commented 8 months ago

Would love to have this 'fixed' in a way thats retroactive to already processed files.

But the workaround that worked for me is to download all photos from "Favorites" in iCloud and then importing them all back into Immich in a dedicated album. Immich recognizes the duplicates but will add the picture/video to the new album.

From there, I could favorite them in one go.

alextran1502 commented 4 months ago

Convert to feature request