google / data-transfer-project

The Data Transfer Project makes it easy for people to transfer their data between online service providers. We are establishing a common framework, including data models and protocols, to enable direct transfer of data both into and out of participating online service providers.

Home Page:http://datatransferproject.dev

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Album splitting logic doesn't seem to be correct

seehamrun opened this issue · comments

The ensureAlbumSize function in the PhotosContainerResource doesn't look entirely correct

https://github.com/google/data-transfer-project/blob/master/portability-types-common/src/main/java/org/datatransferproject/types/common/models/photos/PhotosContainerResource.java#L102-L139

A couple of notable things:

  • The split assumes that all the images corresponding to the albums are present in the same resource
  • Also assumes that the albums that images belong in are also in the same resource (which they may not be if the album was created in the prior resource).

I found this while trying to port this code to the media container resource and incorporate videos, in the meantime im going to not port this over since we have our own handling of this on the Google end and i don't think anyone else relies on this.