Commit Graph

2702 Commits

Author SHA1 Message Date
Manav Rathi
180389f3e2 Can't circumvert that way 2024-07-30 12:00:44 +05:30
Manav Rathi
67a9417528 Scaffold 2024-07-30 11:37:46 +05:30
Manav Rathi
1e720b4b7d Scaffold 2024-07-30 11:23:32 +05:30
Manav Rathi
3dbdea472b Add a top level catch handler instead of silent swallows 2024-07-29 20:46:05 +05:30
Manav Rathi
505e1de14c lint 2024-07-29 16:09:33 +05:30
Manav Rathi
d116c5ccb1 Prune false positives for times picked from file names 2024-07-29 15:59:55 +05:30
Manav Rathi
aad7300e4b Take 2 2024-07-29 15:41:44 +05:30
Manav Rathi
0290991e2c DOMParser is not available in web workers
Exif extraction from XMP thus fails with the following console warning

    Warning: DOMParser is not available. It is needed to be able to parse XMP tags

Thus we need to explicitly take a dep on xmldom.
2024-07-29 15:16:33 +05:30
Manav Rathi
9e2e8e4d63 Fix 2024-07-29 14:54:31 +05:30
Manav Rathi
30db24721a Fix video spinner 2024-07-29 14:46:29 +05:30
Manav Rathi
b121daa607 Trace 2024-07-29 14:40:11 +05:30
Manav Rathi
bae717dc69 Prepare for internal users 2024-07-29 14:19:17 +05:30
Manav Rathi
b61e4f4ac6 Integrate exif 2024-07-29 13:55:37 +05:30
Manav Rathi
a7e0c5b61d Use the new server enum 2024-07-29 13:20:25 +05:30
Crowdin Bot
f09a8c4c51 New Crowdin translations by GitHub Action 2024-07-29 00:31:41 +00:00
Manav Rathi
d1a74da4a4 Rely on the lib's formatters 2024-07-27 21:35:43 +05:30
Manav Rathi
08833390bc Retain previous behaviour 2024-07-27 20:24:59 +05:30
Manav Rathi
e1923fdebd Prone to confusion between the object and the type 2024-07-27 20:13:06 +05:30
Manav Rathi
06be08a382 Fix accidental aliasing 2024-07-27 20:08:56 +05:30
Manav Rathi
99066b8fea Use 2024-07-27 20:02:06 +05:30
Manav Rathi
487fd62feb Rearrange 2024-07-27 20:00:34 +05:30
Manav Rathi
26c40ab2ec Test
Chrome, Safari, Firefox, Node.js (macOS)

    const parseMetadataDate = (s) => {
        const timestamp = new Date(s).getTime() * 1000;
        if (isNaN(timestamp)) return undefined;

        let offsetTime;
        let sWithoutOffset;

        const m = s.match(/Z|[+-]\d\d:?\d\d$/);
        if (m?.index) {
            sWithoutOffset = s.substring(0, m.index);
            offsetTime = s.substring(m.index);
        } else {
            sWithoutOffset = s;
        }

        const date = new Date(
            sWithoutOffset + (sWithoutOffset.length <= 10 ? "" : "Z"),
        );
        const dateTime = dropLast(date.toISOString());

        return { dateTime, offsetTime, timestamp };
    };

    const dropLast = (s) => (s ? s.substring(0, s.length - 1) : s);

    const test = () => {
        console.log(parseMetadataDate("2023"));
        console.log(parseMetadataDate("2023-08"));
        console.log(parseMetadataDate("2023-08-23"));
        console.log(parseMetadataDate("2023-08-23T18:03:00"));
        console.log(parseMetadataDate("2023-08-23T18:03:00+05:30"));
        console.log(parseMetadataDate("2023-08-23T18:03:00.000+05:30"));
        console.log(parseMetadataDate("2023-08-23T12:33:00.000Z"));
    };

    test();
2024-07-27 19:45:15 +05:30
Manav Rathi
4deb9c8f13 Impl wip 2024-07-27 19:22:41 +05:30
Manav Rathi
74c5b22927 Outline 2024-07-27 17:42:54 +05:30
Manav Rathi
8b30d52e94 New home 2024-07-27 16:03:29 +05:30
Manav Rathi
c28b6e3a62 Stay within JavaScript
https://www.typescriptlang.org/docs/handbook/enums.html#objects-vs-enums
2024-07-27 10:29:46 +05:30
Manav Rathi
19304daeab Auto rename didn't catch this 2024-07-27 10:24:12 +05:30
Manav Rathi
5c0942f2b7 Remove unused 2024-07-27 10:15:41 +05:30
Manav Rathi
1adab703b8 Rename FILE_TYPE 2024-07-27 10:14:19 +05:30
Manav Rathi
9613361151 Outline 2024-07-27 10:04:47 +05:30
Manav Rathi
77fcd04613 [web] Exif - Migrate to a maintained library - Part x/x (#2556) 2024-07-27 08:56:28 +05:30
Manav Rathi
90cd6502c1 [desktop] Attempts to improve large drag drops on Windows
Trying to diagnose a customer issue where they reported that the renderer was
crashing when trying to drag and drop a 1TB folder on Windows. Fixing some
things that popped out in the memory allocations or the CPU time when testing
with a synthetic workflow (on macOS) - these may or may not fix their issue, but
these are anyway improvements and will only make things better.
2024-07-26 21:18:17 +05:30
Manav Rathi
7f357d0f65 lint 2024-07-26 16:11:06 +05:30
Manav Rathi
6c7f8e5fae Mention we're ignoring NaNs too 2024-07-26 15:25:17 +05:30
Manav Rathi
b637f2fe08 Handle exif subsecs 2024-07-26 15:15:32 +05:30
Manav Rathi
5995730659 Rearrange 2024-07-26 14:54:51 +05:30
Manav Rathi
689d3c4c82 New lib works in more cases than before 2024-07-26 14:46:52 +05:30
Manav Rathi
d9a8eafbe3 Tweak 2024-07-26 14:29:56 +05:30
Manav Rathi
e14e06dc1a Handle errors 2024-07-26 14:22:09 +05:30
Manav Rathi
ce4063c892 There is always some data (from the image itself e.g.) 2024-07-26 13:33:48 +05:30
Manav Rathi
8cde630e01 Tweaks 2024-07-26 13:09:39 +05:30
Manav Rathi
55a86cc85c Test 1 2024-07-26 13:04:20 +05:30
Manav Rathi
8bf88c2059 Full listing 2024-07-26 12:51:47 +05:30
Manav Rathi
0d01ed5c00 Full listing 2024-07-26 12:38:50 +05:30
Manav Rathi
f6c8e13816 Update wip 2024-07-26 12:07:59 +05:30
Manav Rathi
beace4cbde Parse wip 2024-07-26 11:57:46 +05:30
Manav Rathi
bac49c7058 Ontology wip 2024-07-26 11:03:18 +05:30
Manav Rathi
76faf4c1d7 Use raw exif - wip 1 2024-07-26 09:42:57 +05:30
Manav Rathi
47ded8b302 Dates 2024-07-25 21:07:18 +05:30
Manav Rathi
1501e055a9 Rename 2024-07-25 20:56:25 +05:30