First synchronisation when there is already content on server
This is a point that can be improved. This is about the first synchronisation between the phone and the cloud after adding an account. If content present on the phone is already on server it won't be ignored.
Let's say you have following content on your phone:
- /DCIM/OpenCamera/photo_1.jpg (1,23 Mo)
- /DCIM/OpenCamera/photo_2.jpg (2,89 Mo)
And following in the cloud:
- /Photos/OpenCamera/photo_1.jpg (1,23 Mo)
- /Photos/OpenCamera/photo_2.jpg (2,89 Mo)
Then we can say content is already synced. But if you add your /e/ account on your phone and let start the first synchronisation, it will upload the content of the phone on the cloud even if it's exactly the same.
The Best behaviour will be to say:
- Photo_1.jpg is found on the server. Does I have the same file on the device ? Yes, are they the same ? Yes Then, simply add an entry for this file in database and go to next. So we avoid to synchronize already synced content.
Note: big question is, how to be sure that the file are the same on the server and on the device ? The size is a clue but not sufficient. Best would be get a hash from the one on the server and a hash from the one in the phone. But it probably would be too loud for an android. What if user has already around 800 photo on its phone ?
It is a little a corner case, but while testing, it happens very often.