Move to library
This commit is contained in:
parent
891ba97e0a
commit
c13812c31a
8 changed files with 15 additions and 33 deletions
|
@ -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;
|
||||
|
|
|
@ -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();
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -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 {
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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";
|
||||
|
||||
|
|
|
@ -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;
|
Loading…
Add table
Reference in a new issue