Config: Fix FFmpegResolution() func and related test #3498
Signed-off-by: Michael Mayer <michael@photoprism.app>
This commit is contained in:
parent
9b3917dd00
commit
a6d3eee331
2 changed files with 3 additions and 3 deletions
|
@ -44,10 +44,10 @@ func (c *Config) FFmpegResolution() int {
|
|||
return 4320
|
||||
case c.options.FFmpegResolution <= 144:
|
||||
return 144
|
||||
case c.options.FFmpegBitrate >= 4320:
|
||||
case c.options.FFmpegResolution >= 4320:
|
||||
return 4320
|
||||
default:
|
||||
return c.options.FFmpegBitrate
|
||||
return c.options.FFmpegResolution
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -45,7 +45,7 @@ func TestConfig_FFmpegBitrate(t *testing.T) {
|
|||
|
||||
func TestConfig_FFmpegResolution(t *testing.T) {
|
||||
c := NewConfig(CliTestContext())
|
||||
assert.Equal(t, 144, c.FFmpegResolution())
|
||||
assert.Equal(t, 4320, c.FFmpegResolution())
|
||||
|
||||
c.options.FFmpegResolution = 1920
|
||||
assert.Equal(t, 1920, c.FFmpegResolution())
|
||||
|
|
Loading…
Reference in a new issue