Use in cast
This commit is contained in:
parent
34c664ac33
commit
08f23efeca
3 changed files with 6 additions and 25 deletions
|
@ -1,13 +0,0 @@
|
|||
export const RAW_FORMATS = [
|
||||
"heic",
|
||||
"rw2",
|
||||
"tiff",
|
||||
"arw",
|
||||
"cr3",
|
||||
"cr2",
|
||||
"raf",
|
||||
"nef",
|
||||
"psd",
|
||||
"dng",
|
||||
"tif",
|
||||
];
|
|
@ -1,4 +1,6 @@
|
|||
import { FILE_TYPE } from "@/media/file-type";
|
||||
import { isNonWebImageFileExtension } from "@/media/formats";
|
||||
import { nameAndExtension } from "@/next/file";
|
||||
import log from "@/next/log";
|
||||
import PairedSuccessfullyOverlay from "components/PairedSuccessfullyOverlay";
|
||||
import { PhotoAuditorium } from "components/PhotoAuditorium";
|
||||
|
@ -11,7 +13,7 @@ import {
|
|||
} from "services/cast/castService";
|
||||
import { Collection } from "types/collection";
|
||||
import { EnteFile } from "types/file";
|
||||
import { getPreviewableImage, isRawFileFromFileName } from "utils/file";
|
||||
import { getPreviewableImage } from "utils/file";
|
||||
|
||||
const renderableFileURLCache = new Map<number, string>();
|
||||
|
||||
|
@ -74,7 +76,9 @@ export default function Slideshow() {
|
|||
|
||||
if (file.info.fileSize > 100 * 1024 * 1024) return false;
|
||||
|
||||
if (isRawFileFromFileName(file.metadata.title)) return false;
|
||||
const [, extension] = nameAndExtension(file.metadata.title);
|
||||
|
||||
if (isNonWebImageFileExtension(extension)) return false;
|
||||
|
||||
return true;
|
||||
};
|
||||
|
|
|
@ -2,7 +2,6 @@ import { FILE_TYPE } from "@/media/file-type";
|
|||
import { decodeLivePhoto } from "@/media/live-photo";
|
||||
import log from "@/next/log";
|
||||
import ComlinkCryptoWorker from "@ente/shared/crypto";
|
||||
import { RAW_FORMATS } from "constants/upload";
|
||||
import CastDownloadManager from "services/castDownloadManager";
|
||||
import { detectMediaMIMEType } from "services/detect-type";
|
||||
import {
|
||||
|
@ -95,15 +94,6 @@ export function generateStreamFromArrayBuffer(data: Uint8Array) {
|
|||
});
|
||||
}
|
||||
|
||||
export function isRawFileFromFileName(fileName: string) {
|
||||
for (const rawFormat of RAW_FORMATS) {
|
||||
if (fileName.toLowerCase().endsWith(rawFormat)) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
export function mergeMetadata(files: EnteFile[]): EnteFile[] {
|
||||
return files.map((file) => {
|
||||
if (file.pubMagicMetadata?.data.editedTime) {
|
||||
|
|
Loading…
Add table
Reference in a new issue