google / java-photoslibrary

Java client library for the Google Photos Library API
http://developers.google.com/photos
Apache License 2.0
108 stars 59 forks source link

listMediaItems() method from PhotosLibraryClient.java returns duplicated entries #44

Open lina-grinchenko-wdc opened 2 years ago

lina-grinchenko-wdc commented 2 years ago

It was discovered during integration with Google Photos using java-photoslibrary, please see its details

com.google.photos.library google-photos-library-client 1.7.0

For example, real test account has 468 files in Photos App, although Photos library returns 476 files. When the real list of files on Google Photos was compared with the list of files returned by PhotosLibraryClient.listMediaItems(), appeared that 8 files had duplicates, although there were no duplicates in Photos App.

To handle this issue on our side, we just wrapped result of PhotosLibraryClient.listMediaItems() to Set, although it'd be useful to see any comments about it in documentation, if it is expected, or have a fix for this issue.

Let me know if you need any additional info on it.

Thanks.

nikhil6624 commented 2 years ago

@Grinchenkolina , May I work on this issue? I found the potential root cause of this issue.

lina-grinchenko-wdc commented 2 years ago

@nikhil6624, it'll be good to have this issue fixed, thanks.

nikhil6624 commented 2 years ago

I'll start working on it @Grinchenkolina . :) I have submitted the CLA as well by visiting https://cla.developers.google.com/.

nikhil6624 commented 1 year ago

@Grinchenkolina , I have resolved this issue. Which branch should I choose to push those changes to? Also I'm UNABLE to create a new branch for this issue fix so that I can raise a pull request from that branch. Could you please help me create a branch for pushing those fixes?? image

nikhil6624 commented 1 year ago

@Grinchenkolina , Here's the error I'm getting when I use the Git command line for created a remote tracking branch, image

lina-grinchenko-wdc commented 1 year ago

Hi @nikhil6624, the matter is that I'm not a contributor of this repo. I'm a user of this library who faced this issue.

nikhil6624 commented 1 year ago

@jfschmakeit , could you please give me access to commit to this repo? I have fixed this issue. The issue is actually in the demos project, which uses the photos library client to demonstrate the usage of the library.