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

Update album for dedup before upload #1118

Merged
merged 5 commits into from
Jan 11, 2024
Merged

Update album for dedup before upload #1118

merged 5 commits into from
Jan 11, 2024

Conversation

zatteo
Copy link
Contributor

@zatteo zatteo commented Jan 10, 2024

Adjust album management with dedup #1114

@zatteo zatteo changed the title Album dedup Update album for dedup before upload Jan 10, 2024
@zatteo zatteo marked this pull request as ready for review January 10, 2024 16:38
Copy link
Member

@Ldoppea Ldoppea left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My understanding is that you don't use the backupDeviceIds value on Albums anymore.
So do we really still need it? (vs a fromBackup boolean)

If yes, shouldn't you add the new iPhone ID to the Album's list of backupDeviceIds if it contains only the old iPhone ID?

@zatteo
Copy link
Contributor Author

zatteo commented Jan 11, 2024

My understanding is that you don't use the backupDeviceIds value on Albums anymore. So do we really still need it? (vs a fromBackup boolean)

If yes, shouldn't you add the new iPhone ID to the Album's list of backupDeviceIds if it contains only the old iPhone ID?

I do not use them anymore for albums, but I decided to rely on their existence because they are already here for current backup user. If I started from scratch I would have added a 'fromBackup' boolean like you said.

But I agree that it is confusing to use it without updating it. I think about it. Maybe I will just write some comment/doc about it.

Base automatically changed from feat/dedup-before-upload to master January 11, 2024 11:03
We do not use this function since we decided to create album during upload and not at the beginning (d5c237f)
If a media has been deduplicated, we still want to add it to its albums on Cozy Photos.
Before, backup created remote albums with a device id in metadata. And only remote albums with the good device id were used by a backup.

With dedup mode, we do not want anymore this mechanism because we can :
- take 100 photos with an iPhone 12 and put them in an iOS album "Holiday"
- upload 100 photos with backup and put them in a Cozy Photos album "Holiday"
- buy an iPhone 15 and migrate with Apple our iOS photos and iOS albums in the new iPhone 15
- take 10 new photos and put them in iOS album "Holiday"
- upload 10 photos with backup (previous 100 photos will not be uploaded because deduplicated)
=> even if if is not the same device id, we want to have the 110 photos in the same "Holiday" album on Cozy Photos

So now we use remote albums if they *have* a backupDeviceIds <=> if they have been created by a backup.
@zatteo zatteo merged commit e9dd12d into master Jan 11, 2024
1 check passed
@zatteo zatteo deleted the feat/album-dedup branch January 11, 2024 13:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants