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

Merged
merged 12 commits into from
Nov 20, 2024

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 claucambra added this to the 3.14.4 milestone Oct 30, 2024
@claucambra claucambra self-assigned this Oct 30, 2024
@claucambra
Copy link
Collaborator Author

/backport to stable-3.14

@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?

@Rello Rello modified the milestones: 3.14.5, 3.15.0 Nov 11, 2024
@mgallien mgallien force-pushed the bugfix/live-photos-delete branch from 263cc13 to 3b5222d Compare November 20, 2024 13:39
@mgallien mgallien merged commit 7e6ae84 into master Nov 20, 2024
9 of 14 checks passed
@mgallien mgallien deleted the bugfix/live-photos-delete branch November 20, 2024 13:40
@nextcloud-desktop-bot
Copy link

AppImage file: nextcloud-PR-7435-3b5222d457d43845039c0d942a9ff0895399ecc6-x86_64.AppImage

To test this change/fix you can simply download above AppImage file and test it.

Please make sure to quit your existing Nextcloud app and backup your data.

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.

5 participants