mholt / timeliner

All your digital life on a single timeline, stored locally -- DEPRECATED, SEE TIMELINIZE (link below)
https://timelinize.com
GNU Affero General Public License v3.0
3.57k stars 116 forks source link

Can't add location data to items Google Photos Takeout archive #70

Open tetebueno opened 3 years ago

tetebueno commented 3 years ago

Hi, I'm trying to download all Google Photos data using the API datasource and then merging with the Takeout archive, but when I try to merge the Takeout file nothing seems to happen.

Here are the commands I try:

$ timeliner add-account google_photos/something@gmail.com
# Browser opens up and all permissions are granted.

$ timeliner -v get-all google_photos/something@gmail.com
2021/01/08 20:03:18 [DEBUG] google_photos/something@gmail.com: listing albums: next page (page_token=)
2021/01/08 20:03:37 [DEBUG] google_photos/something@gmail.com: visiting item graph 0xc00078e... (node_item_id=... edges=0 collections=0 relations=0)
2021/01/08 20:03:37 [DEBUG] google_photos/something@gmail.com: visiting item graph 0xc00078e... (node_item_id=... edges=0 collections=0 relations=0)
2021/01/08 20:03:39 [DEBUG] google_photos/something@gmail.com: stored or updated item in database (item_id=... item_row_id=1 soft_merge=false)
2021/01/08 20:03:39 [DEBUG] google_photos/something@gmail.com: stored or updated item in database (item_id=... item_row_id=2 soft_merge=false)
2021/01/08 20:03:40 [DEBUG] google_photos/something@gmail.com: downloaded data file (item_id=... filename=data/2020/12/google_photos/IMG_20201229_093541_232.jpg size=139644)
2021/01/08 20:03:40 [DEBUG] google_photos/something@gmail.com: downloaded data file (item_id=... filename=data/2019/10/google_photos/IMG_20191030_204711.jpg size=1658519)
# Everything is added in place (this is a test account with a couple of photos only).

$ timeliner -v -merge=soft,id,file,meta import takeout.tgz google_photos/something@gmail.com
# Nothing happens...

I checked latitude and longitude fields in the Items table in the DB but nothing is updated (files in the data folder are not updated either, but I think that's not how the merge works).

Let me know if there's a way to get more debug info from this use case. I'm aware that there's not much information here from a troubleshooting perpective.

mholt commented 3 years ago

Hi, that's weird.

Does it just hang and run forever? While it's doing nothing, is your CPU active?

If you have the means, could you add some log.Println() lines in this function:

https://github.com/mholt/timeliner/blob/41cce90c698bf35d1f3985b5b50fa029d9ed9fef/datasources/googlephotos/takeoutarchive.go#L20

and in the archiver.Walk() as well -- that will help trace the program's execution. You can also send it SIGQUIT (Ctrl+\ (on Linux) to have it dump goroutine stacks and exit. It will be interesting to know where it gets hung up.

tetebueno commented 3 years ago

Does it just hang and run forever? While it's doing nothing, is your CPU active?

It runs, then it stops.

I'll give those debugging recommendations a try when I get the chance and get back to you.

Cheers.