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

preserves photos filenames when importing #1227

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

aksingh737
Copy link
Collaborator

No description provided.

Copy link
Collaborator

@jzacsh jzacsh left a comment

Choose a reason for hiding this comment

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

LGTM - just need to sync; eg:

# get the latest changes in your repos
git checkout master &&
  git pull upstream master &&
  git push origin master

assuming the above went well, then do:

# merge the latest changes with your branch
photosImporter=extensions/data-transfer/portability-data-transfer-google/src/main/java/org/datatransferproject/datatransfer/google/photos/GooglePhotosImporter.java
git checkout preserver-filename-photos-fix &&
  git show master:"$photosImporter" > "$photosImporter" &&
  git commit -m 'WIP: reverting fix in prep for file-move from mege' "$photosImporter" &&
  git merge master

# now you can re-write your fix into GPhotosUpload

@@ -214,7 +214,7 @@ private long importPhotoBatch(

try (InputStream s = streamWrapper.getStream()) {
String uploadToken = getOrCreatePhotosInterface(jobId, authData).uploadPhotoContent(s,
photo.getSha1());
photo.getSha1(), photo.getTitle());
Copy link
Collaborator

Choose a reason for hiding this comment

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

note I think this now lives in GPhotosUpload class, so you'll have to revert this file, merge ,and then re-add this param in the new class.

@@ -179,6 +178,10 @@ String uploadPhotoContent(InputStream inputStream, @Nullable String sha1)
.encodeToString(BaseEncoding.base16().decode(sha1.toUpperCase())));
}

if(!title.isEmpty())
Copy link
Collaborator

Choose a reason for hiding this comment

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

nit: style here is a bit weird - I'm guessing this was just wonkiness from your new IDE setup

@CLAassistant
Copy link

CLAassistant commented Jun 26, 2024

CLA assistant check
All committers have signed the CLA.

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.

3 participants