Commit Graph

37938 Commits

Author SHA1 Message Date
Gary Peck
6d2c317877 Add support for Takeout's new .supplemental-metadata.json files
In recent Google Takeout archives, the metadata JSON files are named
"${original_filename}.supplemental-metadata.json" instead of
"${original_filename}.json", as before.

I refactored the previous code so that `getMetadataJSONMapKeyForJSON()`
only removes the ".json" suffix from the metadata filename and does not
make any other changes. All of the filename munging is now done to the
name of the media file. That was the only way I could make the process
deterministic. As far as I can figure out, there's no deterministic way
of deriving the media filename from the metadata filename -- it's only
deterministic going from the media filename to the metadata filename.

These new names are still subject to the 46-character clipping limit,
with some specific rules about how the filename is clipped:

- The ".json" suffix is never clipped, only the ".supplemental-metadata"
  portion is.
- If the original filename is longer than 46 characters, then the
  ".supplemental-metadata" suffix gets completely removed during the
  clipping, along with a portion of the original filename (as before).
- The numbered suffix (if present) is also never clipped. It is however
  added at the end of the clipped ".supplemental-metadata" portion,
  instead of after the original filename. E.g. "IMG_1234(1).jpg" would
  previously use a metadata filename of "IMG_1234.jpg(1).json". Now it
  uses a metadata filename of
  "IMG_1234.jpg.supplemental-metadata(1).json". But if the filename is
  too long, it gets turned into something like
  "IMG_1234.jpg.suppl(1).json".
- Worth noting is that if the original filename is 45 characters long,
  then everything except for the "." from ".supplemental-metadata" will
  get clipped. So the metadata file ends up with a filename like
  "filename_that_is_45_chars_long.jpg..json".

I added a bunch of additional test cases in `upload.test.ts` based on
actual filenames I have in my Google Photos Takeout archives. The new
code passes all of the new test cases, as well as the original ones.
2025-02-03 13:23:40 +01:00
Manav Rathi
f6d4c632c7 [web] Light mode WIP - Part x/x (#4952) 2025-02-03 17:21:41 +05:30
Manav Rathi
919f0e2b57 Prefix to improve greppability
Didn't want to prefix with "--ente" since these are not "global" vars, they're
only for a small scope, using the mechanism that Pigment CSS is recommending
that we follow to introduce dynamism with static styling.

"et" could mean "ente" (but shorter), or "ente temp", or whatever you wish for
it to mean really.
2025-02-03 17:10:17 +05:30
Manav Rathi
388add5984 Pixel 2025-02-03 17:05:57 +05:30
Neeraj
404d1feef6 [mob][photos] Contact person linking final fixes (#4951) 2025-02-03 17:03:17 +05:30
ashilkn
d6e0b85af9 [mob][photos] Bump up to v0.9.92 2025-02-03 17:01:17 +05:30
ashilkn
58c164d2c2 Merge branch 'main' into contact_person_linking_final_fixes 2025-02-03 17:00:02 +05:30
ashilkn
7830f9b1b1 [mob][photos] Chore 2025-02-03 16:59:31 +05:30
Neeraj
efe3240bf4 [mob] Fix personAvatar when low score face is manually assigned (#4950)
## Description

## Tests
2025-02-03 16:50:12 +05:30
Neeraj Gupta
1446f20d69 [mob] Fix personAvatar when low score face is manually assigned 2025-02-03 16:42:46 +05:30
Manav Rathi
296579b80b Fix color 2025-02-03 16:31:47 +05:30
Manav Rathi
aea6961676 [web] New translations (#4949)
New translations from
[Crowdin](https://crowdin.com/project/ente-photos-web)
2025-02-03 16:12:16 +05:30
Crowdin Bot
6c33671da7 New Crowdin translations by GitHub Action 2025-02-03 10:41:04 +00:00
ashilkn
982e0068ee [mob][photos] Create constant variables for keys 2025-02-03 16:10:42 +05:30
Manav Rathi
256178240d [web] Manually sync with Crowdin (#4948)
Building via their dashboard is not applying these changes
2025-02-03 16:10:11 +05:30
Manav Rathi
9d931e2d8b [web] Manually sync with Crowdin
Building via their dashboard is not applying these changes
2025-02-03 16:05:13 +05:30
ashilkn
92234752a2 [mob][photos] Fix border issue 2025-02-03 15:55:48 +05:30
Manav Rathi
1d908cbed6 [web] New translations (#4947)
New translations from
[Crowdin](https://crowdin.com/project/ente-photos-web)
2025-02-03 15:55:34 +05:30
Crowdin Bot
305f727078 New Crowdin translations by GitHub Action 2025-02-03 10:24:17 +00:00
Manav Rathi
9244a1799a [web] New translations (#4946)
New translations from
[Crowdin](https://crowdin.com/project/ente-photos-web)
2025-02-03 15:49:57 +05:30
Crowdin Bot
d76c512d96 New Crowdin translations by GitHub Action 2025-02-03 10:10:30 +00:00
Manav Rathi
8fbbb3a18c [web] Misc minor color and translation fixes (#4945) 2025-02-03 15:39:48 +05:30
Manav Rathi
1b0ed23df9 Fix warning 2025-02-03 15:32:08 +05:30
Manav Rathi
9230ddba3f Prune 2025-02-03 15:30:28 +05:30
Manav Rathi
5f2a1e9386 Rename 2025-02-03 15:24:54 +05:30
Manav Rathi
0d40c382ac Move 2025-02-03 15:21:18 +05:30
Manav Rathi
c1b73dc18c Rename 2025-02-03 15:20:05 +05:30
Manav Rathi
84888df08b Move 2025-02-03 15:19:11 +05:30
Manav Rathi
b43c0f6cc7 Rename 2025-02-03 15:18:23 +05:30
Manav Rathi
fb10d78c34 Rename 2025-02-03 15:13:39 +05:30
Manav Rathi
5b1365e7d1 Rename and move 2025-02-03 15:12:58 +05:30
Manav Rathi
85bf7bbc48 Rename 2025-02-03 15:12:16 +05:30
Manav Rathi
f1bf091faf Reorder 2025-02-03 15:11:04 +05:30
Manav Rathi
f1a345d04d Rename 2025-02-03 15:09:35 +05:30
Manav Rathi
2988a3983e Rename 2025-02-03 15:01:58 +05:30
ashilkn
6fd19b3dca [mob][photos] Fallback to using first letter avatar if face avatar is not available yet becuase db is not ready in UserAvatarWidget 2025-02-03 14:57:35 +05:30
Manav Rathi
58fce85696 Rename 2025-02-03 14:57:15 +05:30
Manav Rathi
fbde5625b2 Rename 2025-02-03 14:56:10 +05:30
Manav Rathi
269660c487 Rename 2025-02-03 14:55:41 +05:30
Manav Rathi
dbae45ee44 Fix 2025-02-03 14:54:40 +05:30
Manav Rathi
0b76611e11 Rename 2025-02-03 14:54:12 +05:30
Manav Rathi
b77ac99bbb Rename 2025-02-03 14:53:03 +05:30
Manav Rathi
7cfad45b65 Rename 2025-02-03 14:51:06 +05:30
Manav Rathi
a3384adfb0 Rename 2025-02-03 14:48:19 +05:30
Manav Rathi
e1e05d4781 Fix key warning 2025-02-03 14:44:59 +05:30
Manav Rathi
b8e2b265c3 Update 2025-02-03 14:39:02 +05:30
ashilkn
e3ffe3e1f0 [mob][photos] Fix search results with wrong thumbnail and possible other wrong elements 2025-02-03 14:38:36 +05:30
Manav Rathi
3c352e9ca2 both grad 2025-02-03 14:35:25 +05:30
ashilkn
85d50890a6 [mob][photos] Minor perf optimization 2025-02-03 14:33:21 +05:30
ashilkn
1201cfc42d [mob][photos] Show contacts that have shared nothing yet also in contacts section and search 2025-02-03 14:12:39 +05:30