-
-
Notifications
You must be signed in to change notification settings - Fork 55
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
Add parsing of sharedAlbumComments
when importing shared albums
#434
Comments
OMG. It looks like the |
Don't forget that images and albums have only one field for the description. |
Yes, I understand, this is not a description. It's an "Activity" log associated with the shared album and/or photo. This doesn't exist for regular albums, only shared ones. It works the same way in Immich. If you create a shared album, a comment bubble appears at the bottom of the photos/album. I'm pretty sure this corresponds to the "Activities" API. |
I don't know this exists... |
By the way, thank you for your sponsorship! Really appreciated |
I have created a testing google photos album that I'd be happy to share (it's 11M), but I've been unable to get google to create the WRT sponsorship, I just want you to know I appreciate your work of making open such a useful tool! I don't think my attempting to code up a patch in go would be very helpful, since I've never written anything in it before 😆 |
Oh geeze. So now I'm back to the So, to summarize what I looks like is going on: The I've attached the takeout file for a test album I created. Hilariously, github would only accept it if I capitalized |
Thanks for your analysis. The Album folder contains anything we need:
The immich create API (https://main.preview.immich.app/docs/api/create-activity) shows following:
I have liked the Billy Joe photo. Could you extract the album again? |
I have extracted the album again (this time as a .zip file). Thanks for doing the "like", I didn't think about that. Looks like doing so adds another optional |
Anyway, the user identity is valid only for Google Photos... The probability that the user doesn't exist in Immich is high. Immich uses certainly the identity behind the API key for the comments created via the API. There is no notion of date of the comment. So all comments will be created at the date of the import. Last point: reprocessing a takeout is a common practice... This is possible because immich-go can check if the photo is already uploaded, and which album it should belong to. It's not possible to make a difference between comments imported and comments added by the user using immich. So the usual trick that is delete everything and re-import isn't ideal. Knowing this, I'm wondering if having this imperfect import is desirable. |
I agree 100% that it would be impossible to map google photos user onto immich user, even if the API allowed such a mapping, so just putting username into the comment is the best choice. WRT the date, immich does keep track of comment dates, but again, the API has no facility for setting this, so using the date of the import is best. WRT reprocessing the takeout, yes, I see your point. The API does have the facility to retrieve activities, so it may be possible to do this, then compare comments, similar to how photos are compared to not upload duplicates. But if that's impractical, maybe a command line flag making the comment import optional? That way it could be done only the first time? Personally, I would much rather have an imperfect import, than no import at all. |
We can also motivate the immich team to add missing fields to their API:
Then the google date of the event can be a key field. It won't change over import tasks or even across several takeouts. |
That would be wonderful if the immich team would add those fields, I have opened a feature request for such an addition. Even if they don't implement it though, an optional import with the dates wrong and the user name in the comments would be much better than not importing it at all 😸 |
No reaction or comment on the immich feature request yet. Any chance of an optional comment import in the meantime? |
The limitations of the current API limit the interest on this feature. |
It doesn't look like there's any progress on this from Immich's perspective. Is there any possibility you'd be willing to implement an optional import of comments (based on a command line flag), where the date and user just default to the current time and current API key owner? I wish I could offer to create a PR, but I don't know anything about golang or how immich-go is structured, so I'm afraid any attempt I made would be pretty crude. |
There are some other requests around shared albums The CLI options becomes clumsy. I'm working in the CLI reorganization (but with no regressions). I'll come back on this after |
In Google Photos, shared albums have the ability to associate comments with the album and/or individual photos in the album. This is represented by an "Activity" log, and is exported in each album's
metadata.json
file as thesharedAlbumComments
structure. Immich apparently has a very similar feature, represented by theActivities
API. I would like to request that immich-go import these comments into the created shared albums. This looks like it could be easily done using thecreateActivity
API.Ugh, upon further investigation, it looks like only some random assortment of comments are in the metadata.json file, but not all of them. The rest of them apparently show up in the
shared_album_comments.json
file at the top of the takeout structure, and are only associated with a particular album via thecontentUrl
field. I don't see any logic or reason behind which comments show up where, except that there's nocontentOwnerName
field in theshared_album_comments.json
file, so apparently all of those are comments by the album owner? There are also album owner comments in themetadata.json
file, though, so it's not obvious what causes them to be in one or the other.Hmm, looks like I did this wrong. I created this as a result of Discussion #433 when maybe I should have just converted it to an issue. Well, now they're linked I guess..
The text was updated successfully, but these errors were encountered: