mirror of
https://github.com/immich-app/immich.git
synced 2025-11-01 11:07:11 -04:00
* fix(server): use mp4 file extension for motion photo videos in archive download * always use mp4 for videos * get file extension from originalPath * remove console log * store motion assets with mp4 extension * add migration * set originalFileName for live photo asset stubs * leave down migration empty * only set originalFileName for livePhotoStillAsset * use separate stub * shorter stub name
12 lines
457 B
TypeScript
12 lines
457 B
TypeScript
import { MigrationInterface, QueryRunner } from 'typeorm';
|
|
|
|
export class MotionAssetExtensionMP41715435221124 implements MigrationInterface {
|
|
public async up(queryRunner: QueryRunner): Promise<void> {
|
|
await queryRunner.query(
|
|
`UPDATE "assets" SET "originalFileName" = regexp_replace("originalFileName", '\\.[a-zA-Z0-9]+$', '.mp4') WHERE "originalPath" LIKE '%.mp4' AND "isVisible" = false`,
|
|
);
|
|
}
|
|
|
|
public async down(): Promise<void> {}
|
|
}
|