Move to library

This commit is contained in:
Manav Rathi 2024-04-25 12:46:21 +05:30
parent 891ba97e0a
commit c13812c31a
No known key found for this signature in database
8 changed files with 15 additions and 33 deletions

View file

@ -1,9 +1,9 @@
import type { Metadata } from "@/media/types/file";
import {
EncryptedMagicMetadata,
MagicMetadataCore,
VISIBILITY_STATE,
} from "types/magicMetadata";
import { Metadata } from "types/upload";
export interface MetadataFileAttributes {
encryptedData: string;

View file

@ -4,7 +4,7 @@ import HTTPService from "@ente/shared/network/HTTPService";
import { getEndpoint } from "@ente/shared/network/api";
import { getToken } from "@ente/shared/storage/localStorage/helpers";
import { EnteFile } from "types/file";
import { Metadata } from "types/upload";
import type { Metadata } from "@/media/types/file";
import { hasFileHash } from "utils/upload";
const ENDPOINT = getEndpoint();

View file

@ -1,5 +1,6 @@
import { FILE_TYPE } from "@/media/file-type";
import { decodeLivePhoto } from "@/media/live-photo";
import type { Metadata } from "@/media/types/file";
import { ensureElectron } from "@/next/electron";
import log from "@/next/log";
import { CustomError } from "@ente/shared/error";
@ -22,7 +23,6 @@ import {
FileExportNames,
} from "types/export";
import { EnteFile } from "types/file";
import { Metadata } from "types/upload";
import {
constructCollectionNameMap,
getCollectionUserFacingName,

View file

@ -1,5 +1,6 @@
import { FILE_TYPE, type FileTypeInfo } from "@/media/file-type";
import { encodeLivePhoto } from "@/media/live-photo";
import type { Metadata } from "@/media/types/file";
import { ensureElectron } from "@/next/electron";
import { basename, getFileNameSize } from "@/next/file";
import log from "@/next/log";
@ -42,7 +43,6 @@ import {
UploadURL,
type FileWithCollection2,
type LivePhotoAssets2,
type Metadata,
type UploadAsset2,
} from "types/upload";
import {

View file

@ -1,10 +1,10 @@
import type { Metadata } from "@/media/types/file";
import { SourceURLs } from "services/download";
import {
EncryptedMagicMetadata,
MagicMetadataCore,
VISIBILITY_STATE,
} from "types/magicMetadata";
import { Metadata } from "types/upload";
export interface MetadataFileAttributes {
encryptedData: string;

View file

@ -13,28 +13,6 @@ import {
} from "types/file";
import { EncryptedMagicMetadata } from "types/magicMetadata";
/** Information about the file that never changes post upload. */
export interface Metadata {
/**
* The file name.
*
* See: [Note: File name for local EnteFile objects]
*/
title: string;
creationTime: number;
modificationTime: number;
latitude: number;
longitude: number;
/** The "Ente" file type. */
fileType: FILE_TYPE;
hasStaticThumbnail?: boolean;
hash?: string;
imageHash?: string;
videoHash?: string;
localID?: number;
version?: number;
deviceFolder?: string;
}
export interface Location {
latitude: number;

View file

@ -1,13 +1,10 @@
import type { Metadata } from "@/media/types/file";
import { basename, dirname } from "@/next/file";
import { ElectronFile } from "@/next/types/file";
import { PICKED_UPLOAD_TYPE } from "constants/upload";
import isElectron from "is-electron";
import { exportMetadataDirectoryName } from "services/export";
import {
FileWithCollection,
Metadata,
type FileWithCollection2,
} from "types/upload";
import { FileWithCollection, type FileWithCollection2 } from "types/upload";
const TYPE_JSON = "json";

View file

@ -1,11 +1,18 @@
import { FILE_TYPE } from "@/media/file-type";
import type { FILE_TYPE } from "../file-type";
/** Information about the file that never changes post upload. */
export interface Metadata {
/**
* The file name.
*
* See: [Note: File name for local EnteFile objects]
*/
title: string;
creationTime: number;
modificationTime: number;
latitude: number;
longitude: number;
/** The "Ente" file type. */
fileType: FILE_TYPE;
hasStaticThumbnail?: boolean;
hash?: string;