From 0666bf56df6061bd84995aeb0b4336df760a2f76 Mon Sep 17 00:00:00 2001 From: Manav Rathi Date: Thu, 15 May 2025 07:45:39 +0530 Subject: [PATCH] [desktop] Enable HLS generation for internal users --- web/packages/gallery/services/file-data.ts | 4 ++-- web/packages/gallery/services/upload/upload-service.ts | 2 -- web/packages/gallery/services/video.ts | 6 +----- 3 files changed, 3 insertions(+), 9 deletions(-) diff --git a/web/packages/gallery/services/file-data.ts b/web/packages/gallery/services/file-data.ts index 68d0b6a8c5..20ae622f9a 100644 --- a/web/packages/gallery/services/file-data.ts +++ b/web/packages/gallery/services/file-data.ts @@ -255,8 +255,8 @@ export const syncUpdatedFileDataFileIDs = async ( for (const fd of diff) { lastUpdatedAt = Math.max(lastUpdatedAt, fd.updatedAt); // While we could prune isDeleted entries here, we can also rely - // on the the pruning that happens when the trash gets synced. - // See: [Note: Pruning stale status-diff entries] + // on the pruning that happens when the trash gets synced. See: + // [Note: Pruning stale status-diff entries] if (fd.type == type && !fd.isDeleted) { fileIDs.add(fd.fileID); } diff --git a/web/packages/gallery/services/upload/upload-service.ts b/web/packages/gallery/services/upload/upload-service.ts index 0dee402d1a..8396646b09 100644 --- a/web/packages/gallery/services/upload/upload-service.ts +++ b/web/packages/gallery/services/upload/upload-service.ts @@ -1055,8 +1055,6 @@ const extractImageOrVideoMetadata = async ( settingsSnapshot().isInternalUser ) { duration = await tryDetermineVideoDuration(uploadItem); - // TODO(HLS): - log.debug(() => ["extracted duration", duration]); } // To avoid introducing malformed data into the metadata fields (which the diff --git a/web/packages/gallery/services/video.ts b/web/packages/gallery/services/video.ts index 75021e7248..7824b72e9c 100644 --- a/web/packages/gallery/services/video.ts +++ b/web/packages/gallery/services/video.ts @@ -216,14 +216,10 @@ export const isHLSGenerationSupported = () => // Keep this check fast, we get called many times. isDesktop && // TODO(HLS): - process.env.NEXT_PUBLIC_ENTE_WIP_VIDEO_STREAMING && settingsSnapshot().isInternalUser; // TODO(HLS): Only the isDesktop flag is needed eventually. -export const isHLSGenerationSupportedTemp = () => - isDesktop && - // TODO(HLS): - process.env.NEXT_PUBLIC_ENTE_WIP_VIDEO_STREAMING; +export const isHLSGenerationSupportedTemp = () => isDesktop; /** * Initialize the video processing subsystem if the user has enabled HLS