lf
This commit is contained in:
@@ -243,12 +243,14 @@ const decryptEnteFile = async (
|
||||
file.metadata.title = file.pubMagicMetadata.data.editedName;
|
||||
}
|
||||
// @ts-expect-error TODO: The core types need to be updated to allow the
|
||||
// possibility of missing metadata fiels.
|
||||
// possibility of missing metadata fields.
|
||||
return file;
|
||||
};
|
||||
|
||||
const isFileEligible = (file: EnteFile) => {
|
||||
if (!isImageOrLivePhoto(file)) return false;
|
||||
// @ts-expect-error TODO: The core types need to be updated to allow the
|
||||
// possibility of missing info fields (or do they?)
|
||||
if (file.info.fileSize > 100 * 1024 * 1024) return false;
|
||||
|
||||
// This check is fast but potentially incorrect because in practice we do
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
import { FILE_TYPE } from "@/media/file-type";
|
||||
import { decodeLivePhoto } from "@/media/live-photo";
|
||||
import type { Metadata } from "@/media/types/file";
|
||||
import downloadManager from "@/new/photos/services/download";
|
||||
import {
|
||||
exportMetadataDirectoryName,
|
||||
exportTrashDirectoryName,
|
||||
@@ -38,7 +39,6 @@ import {
|
||||
} from "utils/collection";
|
||||
import { getPersonalFiles, getUpdatedEXIFFileForDownload } from "utils/file";
|
||||
import { getAllLocalCollections } from "../collectionService";
|
||||
import downloadManager from "../download";
|
||||
import { migrateExport } from "./migration";
|
||||
|
||||
/** Name of the JSON file in which we keep the state of the export. */
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
import { ensure } from "@/utils/ensure";
|
||||
import { wait } from "@/utils/promise";
|
||||
|
||||
export function downloadAsFile(filename: string, content: string) {
|
||||
@@ -47,7 +48,7 @@ export async function retryAsyncFunction<T>(
|
||||
if (attemptNumber === waitTimeBeforeNextTry.length) {
|
||||
throw e;
|
||||
}
|
||||
await wait(waitTimeBeforeNextTry[attemptNumber]);
|
||||
await wait(ensure(waitTimeBeforeNextTry[attemptNumber]));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user