From 7ef59bb4ccc9e9082ba95a7191debd1dbf310e13 Mon Sep 17 00:00:00 2001 From: Manav Rathi Date: Fri, 29 Mar 2024 21:01:17 +0530 Subject: [PATCH] Short circuit unused code isFileEligibleForCast filters out isRawFileFromFileName. Specifically, it filters out HEIC files. So getRenderableImage is a no-op. --- web/apps/cast/src/utils/file/index.ts | 6 ------ 1 file changed, 6 deletions(-) diff --git a/web/apps/cast/src/utils/file/index.ts b/web/apps/cast/src/utils/file/index.ts index fb7e4ac673..d1f11d75dc 100644 --- a/web/apps/cast/src/utils/file/index.ts +++ b/web/apps/cast/src/utils/file/index.ts @@ -367,15 +367,9 @@ export const getPreviewableImage = async ( const livePhoto = await decodeLivePhoto(file, fileBlob); fileBlob = new Blob([livePhoto.image]); } - const convertedBlob = await getRenderableImage( - file.metadata.title, - fileBlob, - ); - fileBlob = convertedBlob; const fileType = await getFileType( new File([fileBlob], file.metadata.title), ); - fileBlob = new Blob([fileBlob], { type: fileType.mimeType }); return fileBlob; } catch (e) {