pulsejet / memories

Fast, modern and advanced photo management suite. Runs as a Nextcloud app.
https://memories.gallery
GNU Affero General Public License v3.0
3.22k stars 87 forks source link

Google Takeout media being tagged to import date after doing migrate takeout and force indexing #910

Closed ahuston-0 closed 1 year ago

ahuston-0 commented 1 year ago

Describe the bug I bulk imported all of the data on my Google Photos from a recent Takeout to Nextcloud Memories recently and ran the following to migrate everything docker exec -it nextcloud-nextcloud-1 su -p "www-data" -s /bin/sh -c 'php /var/www/html/occ memories:migrate-google-takeout -u alice -f /GooglePhotos -vvv'. After doing so, I am seeing that several photos (most of which appear to be downloaded tiktoks) were being aligned to the date that they were imported. As I had some issues with my database part of the way through due to hitting the maximum connection limit to Postgres, I thought maybe that had something to do with it, deleted all of the files, and reimported the Takeout. This time when i ran the import, I gave the same command but with -o (docker exec -it nextcloud-nextcloud-1 su -p "www-data" -s /bin/sh -c 'php /var/www/html/occ memories:migrate-google-takeout -u alice -f /GooglePhotos -vvv -o'), as I could see in the JSONs for these files that the original date was there and that these ideally should have been showing different dates earlier in the year. After checking with the help channel in Discord, I was asked to do a force reindexing of my media, and after doing so I am still seeing the date for this media as the import date.

To Reproduce Steps to reproduce the behavior:

  1. Presumably download a few tiktoks as they seem to be most affected here
  2. Initiate a Google Takeout
  3. Import the Takeout data to Nextcloud
  4. Verify that the media is being tagged to the import date
  5. Run occ memories:migrate-google-takeout
  6. Force index everything occ memories:index -f -vvv
  7. Refresh the page with cache disabled
  8. Verify that the media is still being tagged to the import date

Screenshots If applicable, add screenshots to help explain your problem.

Screenshot showing that the file is still showing November 6th 2023 even after a force reindexing and reloading the page with cache disabled. image

Older file: https://github.com/pulsejet/memories/assets/43225907/a34610b7-c040-489e-bbf6-9129fec828c8

Newer file:

https://github.com/pulsejet/memories/assets/43225907/eea3eb83-b6ae-4429-8f7d-befc62b4d26d

Platform:

Additional context Add any other context about the problem here.

pulsejet commented 1 year ago

This was a bug in the migration script specific to videos. You'll need to rerun the takeout migration in the next version.

ahuston-0 commented 1 year ago

Will it automatically pick up or will I need to delete and reimport the videos again since there's already the "memoriesMigratorVersion": 1 tag in the json's?

ahuston-0 commented 1 year ago

nevermind I see you bumped the version in the commit

pulsejet commented 1 year ago

Yeah, you can go ahead and apply this patch locally if you like. It shouldn't conflict with anything.

ahuston-0 commented 1 year ago

Hi, I deleted and reuploaded the files so I'd have a clean slate, verified that everything was bunched up on Oct 30th 2023 (the export date), and then kicked off the migration. Its still running, but I'm watching some files do the same thing where they're moving from the export date to today when all of these files are from 2017 or earlier. Once it gets to 2023 I'll see if I can pull the files for everything again like last time. I can verify though that I am on version 6.1.0 and the JSONs are getting updated with migrator version 2.

ahuston-0 commented 1 year ago

@pulsejet it looks like most of the videos from last time updated properly but there's still files that updated to today's date or did not update at all.. do you want me to open a new issue for this?

pulsejet commented 1 year ago

Yeah, do include both the original file and the json