Skip to content

armgit / ente

Public Imported from GitHub
0

πŸ’š End-to-end encrypted cloud for everything.

only show convert option on desktop

Abhinavf4e87d934a44
diff --git a/apps/photos/src/components/PhotoViewer/index.tsx b/apps/photos/src/components/PhotoViewer/index.tsx
index 144b06cc93..94e779f8f7 100644
--- a/apps/photos/src/components/PhotoViewer/index.tsx
+++ b/apps/photos/src/components/PhotoViewer/index.tsx
@@ -50,6 +50,7 @@ import CircularProgressWithLabel from './styledComponents/CircularProgressWithLa
import EnteSpinner from 'components/EnteSpinner';
import AlbumOutlined from '@mui/icons-material/AlbumOutlined';
import { FlexWrapper } from 'components/Container';
+import isElectron from 'is-electron';
interface PhotoswipeFullscreenAPI {
enter: () => void;
@@ -298,6 +299,7 @@ function PhotoViewer(props: Iprops) {
function updateShowConvertBtn(file: EnteFile) {
const shouldShowConvertBtn =
+ isElectron() &&
(file.metadata.fileType === FILE_TYPE.VIDEO ||
file.metadata.fileType === FILE_TYPE.LIVE_PHOTO) &&
!file.isConverted &&
diff --git a/apps/photos/src/utils/file/index.ts b/apps/photos/src/utils/file/index.ts
index 7d04939cb2..e49d75b18e 100644
--- a/apps/photos/src/utils/file/index.ts
+++ b/apps/photos/src/utils/file/index.ts
@@ -411,6 +411,9 @@ export async function getPlayableVideo(
if (isPlayable && !forceConvert) {
return videoBlob;
} else {
+ if (!isElectron()) {
+ return null;
+ }
addLogLine(
'video format not supported, converting it name:',
videoNameTitle