mirror of
https://github.com/immich-app/immich.git
synced 2025-07-03 21:40:00 +02:00
feat(server): do not automatically download android motion videos (#11774)
feat(server): do not automatically download embedded android motion videos
This commit is contained in:
parent
ed6971222c
commit
32c05ea950
13 changed files with 151 additions and 28 deletions
web/src/lib/utils
|
@ -172,13 +172,19 @@ export const downloadFile = async (asset: AssetResponseDto) => {
|
|||
},
|
||||
];
|
||||
|
||||
const isAndroidMotionVideo = (asset: AssetResponseDto) => {
|
||||
return asset.originalPath.includes('encoded-video');
|
||||
};
|
||||
|
||||
if (asset.livePhotoVideoId) {
|
||||
const motionAsset = await getAssetInfo({ id: asset.livePhotoVideoId, key: getKey() });
|
||||
assets.push({
|
||||
filename: motionAsset.originalFileName,
|
||||
id: asset.livePhotoVideoId,
|
||||
size: motionAsset.exifInfo?.fileSizeInByte || 0,
|
||||
});
|
||||
if (!isAndroidMotionVideo(motionAsset) || get(preferences).download.includeEmbeddedVideos) {
|
||||
assets.push({
|
||||
filename: motionAsset.originalFileName,
|
||||
id: asset.livePhotoVideoId,
|
||||
size: motionAsset.exifInfo?.fileSizeInByte || 0,
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
for (const { filename, id, size } of assets) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue