mirror of
https://github.com/immich-app/immich
synced 2025-11-07 17:27:20 +00:00
feat(server, web): Added TranscodePolicy "Bitrate higher than max bitrate or not in accepted format" (#6479)
* chore: rebase * chore: open api * Add Database-Migration for setting targetCodec as acceptedCodec if it was set by admin * Add TranscodePolicy setting, to only transcode files with a bitrate higher than set max bitrate * Rename enum value of TranscodePolicy * calculate max_bitrate according to "k" and "m" suffix for comparison * remove migration * minor changes * UnitTest for Bitrate Policy * Fix UnitTest * Add missing output options --------- Co-authored-by: Jason Rasmussen <jrasm91@gmail.com> Co-authored-by: mertalev <101130780+mertalev@users.noreply.github.com>
This commit is contained in:
parent
149bc71eba
commit
87c38d1832
10 changed files with 84 additions and 1 deletions
3
mobile/openapi/lib/model/transcode_policy.dart
generated
3
mobile/openapi/lib/model/transcode_policy.dart
generated
|
|
@ -25,6 +25,7 @@ class TranscodePolicy {
|
|||
|
||||
static const all = TranscodePolicy._(r'all');
|
||||
static const optimal = TranscodePolicy._(r'optimal');
|
||||
static const bitrate = TranscodePolicy._(r'bitrate');
|
||||
static const required_ = TranscodePolicy._(r'required');
|
||||
static const disabled = TranscodePolicy._(r'disabled');
|
||||
|
||||
|
|
@ -32,6 +33,7 @@ class TranscodePolicy {
|
|||
static const values = <TranscodePolicy>[
|
||||
all,
|
||||
optimal,
|
||||
bitrate,
|
||||
required_,
|
||||
disabled,
|
||||
];
|
||||
|
|
@ -74,6 +76,7 @@ class TranscodePolicyTypeTransformer {
|
|||
switch (data) {
|
||||
case r'all': return TranscodePolicy.all;
|
||||
case r'optimal': return TranscodePolicy.optimal;
|
||||
case r'bitrate': return TranscodePolicy.bitrate;
|
||||
case r'required': return TranscodePolicy.required_;
|
||||
case r'disabled': return TranscodePolicy.disabled;
|
||||
default:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue