Skip to content

armgit / ente

Public Imported from GitHub
0

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

Fix swap

Manav Rathi6ff909d3b803
diff --git a/web/packages/gallery/components/viewer/photoswipe.ts b/web/packages/gallery/components/viewer/photoswipe.ts
index e3d7d9c901..f26b4d2f24 100644
--- a/web/packages/gallery/components/viewer/photoswipe.ts
+++ b/web/packages/gallery/components/viewer/photoswipe.ts
@@ -22,7 +22,6 @@ import {
itemDataForFile,
updateFileInfoExifIfNeeded,
type ItemData,
- type ItemDataOpts,
} from "./data-source";
import {
type FileViewerAnnotatedFile,
@@ -329,17 +328,19 @@ export class FileViewerPhotoSwipe {
const files = delegate.getFiles();
const file = files[index]!;
- const opts: ItemDataOpts = {
- videoQuality: videoQualityForFile(file),
- };
+ const videoQuality = videoQualityForFile(file);
- const itemData = itemDataForFile(file, opts, () =>
+ const itemData = itemDataForFile(file, { videoQuality }, () =>
pswp.refreshSlideContent(index),
);
if (itemData.fileType === FileType.video) {
const { videoPlaylistURL, videoURL } = itemData;
- if (videoPlaylistURL) {
+ if (
+ videoPlaylistURL &&
+ shouldUsePlayerV2() &&
+ videoQuality == "auto"
+ ) {
const mcID = `ente-mc-hls-${file.id}`;
return {
...itemData,