Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix sync errors when trying to delete video component of live photos #7435

Open
wants to merge 12 commits into
base: master
Choose a base branch
from

Conversation

claucambra
Copy link
Collaborator

Live photos uploaded to the server are composed of an image file (usually a .jpeg or a .heic) and a video file (a .mov file), which get presented to the user via the iOS and Web UIs as a single "live photo", like in the Apple Photos applications

To maintain this representation the server treats these image/video pairs as inseparable -- the video cannot be deleted by itself, only a delete of the image will lead to the deletion of the video. This means we cannot issue deletes for the videos, as the server will reject this and we will end up showered in sync errors.

This PR therefore changes the local discovery behaviour to not propagate the local deletion of live photo mov files to the server, and to instead simply re-download the file if it has been deleted

@claucambra
Copy link
Collaborator Author

/backport to stable-3.14

Copy link

sonarcloud bot commented Oct 30, 2024

Quality Gate Failed Quality Gate failed

Failed conditions
6 Security Hotspots
D Maintainability Rating on New Code (required ≥ A)
59 New Code Smells (required ≤ 0)

See analysis details on SonarCloud

Catch issues before they fail your Quality Gate with our IDE extension SonarLint

@claucambra claucambra modified the milestones: 3.14.4, 3.14.5 Nov 3, 2024
@klada
Copy link

klada commented Nov 4, 2024

@claucambra When copying a folder containing "Live Photos" to a different location, what happens to the isLivePhoto property of the respective files?

@claucambra
Copy link
Collaborator Author

claucambra commented Nov 5, 2024

@claucambra When copying a folder containing "Live Photos" to a different location, what happens to the isLivePhoto property of the respective files?

From the client perspective, we propagate the copy to the server and then pull down whatever state these files are in post copy remotely. We don't manually mark these new files as live photos (at least, not at the moment)

@klada
Copy link

klada commented Nov 6, 2024

@claucambra When copying a folder containing "Live Photos" to a different location, what happens to the isLivePhoto property of the respective files?

From the client perspective, we propagate the copy to the server and then pull down whatever state these files are in post copy remotely. We don't manually mark these new files as live photos (at least, not at the moment)

I have just tested 3.14.3 on Mac OS and the sync client does not use COPY requests for copying subtrees (CMD+C on a folder, CMD+V in a different place). Instead, subtrees are created as completely new directory structures through multiple MKCOL requests for the actual folders and re-uploads of the contents through multiple bulk POST requests.

That's why I am a little in doubt if the content's isLivePhoto flags will be retained in this situation. Shouldn't these bulk-POST-ed files look like completely new files to the server with the current architecture? Or am I missing something here?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants