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.
Ente's web apps
Source code for Ente's various web apps and supporting websites.
Live versions are at:
- Ente Photos: web.ente.io
- Ente Auth: auth.ente.io
To know more about Ente, see our main README or visit ente.io.
Building from source
Fetch submodules
git submodule update --init --recursive
Install dependencies
yarn install
Start a local development server
yarn dev
That's it. The web app will automatically hot reload when you make changes.
Tip
If you're new to web development and unsure about how to get started, or are facing some problems when running the above steps, see docs/new.
Other apps
By default, yarn dev builds the Photos app. You can build the auth app by
doing yarn dev:auth.
To see the full list of apps you can run (and other scripts that you can use),
use yarn run.
For more details about development workflows, see docs/dev.
Directory structure
As a brief overview, this directory contains the following apps:
apps/photos: A fully functional web client for Ente Photos.apps/auth: A view only client for Ente Auth. Currently you can only view your 2FA codes using this web app. For adding and editing your 2FA codes, please use the Ente Auth mobile/desktop app instead.
These are the public facing apps. There are other part of the code which are accessed as features within the main apps, but in terms of code are independently maintained and deployed:
apps/accounts: Passkey support.apps/cast: Browser and Chromecast casting support.apps/payments: Handle subscription payments.
Apart from these, we also have the manage family portal whose code is currently in a separate repository (https://github.com/ente-io/families) and still needs to be brought here.
The apps take use various packages/ to share code amongst themselves.
You might also find this overview of dependencies useful.
Attributions
City coordinates from Simple Maps
🌍 Translate
If you're interested in helping out with translation, please visit our Crowdin project to get started. Thank you for your support.
If your language is not listed for translation, please create a GitHub issue to have it added.
Contribute
For more ways to contribute, see ../CONTRIBUTING.md.