Commit Graph

37956 Commits

Author SHA1 Message Date
Manav Rathi
01ebe68f09 Inline 2025-02-04 08:44:22 +05:30
Manav Rathi
6d02686331 Inline 2025-02-04 08:15:32 +05:30
Manav Rathi
d2ffea6cf9 Trim 2025-02-04 08:10:25 +05:30
Manav Rathi
ca841dcced Reduce exports 2025-02-04 08:09:25 +05:30
Manav Rathi
9933bd5385 Reduce duplication in tests 2025-02-04 08:06:10 +05:30
Manav Rathi
90e052fa49 Reorder 2025-02-04 07:58:43 +05:30
Manav Rathi
ad12458774 Tweak 2025-02-04 07:52:48 +05:30
Manav Rathi
fa00c06cf8 Rename 2025-02-04 07:48:01 +05:30
Manav Rathi
b8f475bf2e Rename 2025-02-04 07:43:46 +05:30
Manav Rathi
ffc87312d1 Split into groups 2025-02-04 07:38:11 +05:30
Manav Rathi
48f0f62d7c Add support for Takeout's new .supplemental-metadata.json files (#4956)
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.

Fixes #4953
2025-02-04 07:32:11 +05:30
Ashil
9ac2ebfc08 [mob][photos] Fix freezing app + improvements to contacts-faces linking (#4957) 2025-02-03 20:45:31 +05:30
ashilkn
c96102c2b8 [mob][photos] Fallback to using first file as thumbnail for contacts section elements if PersonFaceWidget fails in contact section 2025-02-03 19:43:16 +05:30
ashilkn
f69dd18364 [mob][photos] Show onThisDayOrWeeksResults in moments section only on iOS 2025-02-03 19:32:49 +05:30
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
3454536799 [web] Fix casing of source string (#4955) 2025-02-03 17:50:01 +05:30
Manav Rathi
1ecd688fb8 [web] Fix casing of source string 2025-02-03 17:46:38 +05:30
Manav Rathi
54971cbaf8 [web] New translations (#4954)
New translations from
[Crowdin](https://crowdin.com/project/ente-photos-web)
2025-02-03 17:46:20 +05:30
Crowdin Bot
a892061446 New Crowdin translations by GitHub Action 2025-02-03 12:15:21 +00: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