mirror of
https://github.com/immich-app/immich.git
synced 2025-12-23 17:25:11 +03:00
fix(server): use libopus for transcoding (#4102)
* updated audio codec enum * added migration * updated api * fixed enum * formatting * simplified migration
This commit is contained in:
@@ -0,0 +1,21 @@
|
||||
import { MigrationInterface, QueryRunner } from "typeorm";
|
||||
|
||||
export class UpdateOpusCodecToLibopus1694758412194 implements MigrationInterface {
|
||||
name = 'UpdateOpusCodecToLibopus1694758412194'
|
||||
|
||||
public async up(queryRunner: QueryRunner): Promise<void> {
|
||||
await queryRunner.query(`
|
||||
UPDATE system_config
|
||||
SET value = '"libopus"'
|
||||
WHERE key = 'ffmpeg.targetAudioCodec' AND value = '"opus"'
|
||||
`);
|
||||
}
|
||||
|
||||
public async down(queryRunner: QueryRunner): Promise<void> {
|
||||
await queryRunner.query(`
|
||||
UPDATE system_config
|
||||
SET value = '"opus"'
|
||||
WHERE key = 'ffmpeg.targetAudioCodec' AND value = '"libopus"'
|
||||
`);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user