mirror of
https://github.com/stashapp/stash.git
synced 2025-12-17 20:34:37 +03:00
Don't regenerate covers if present during scan (#3646)
* Don't regenerate covers if present during scan * Fix performer unit test (unrelated)
This commit is contained in:
@@ -1114,11 +1114,14 @@ func verifyPerformerAge(t *testing.T, ageCriterion models.IntCriterionInput) {
|
||||
|
||||
d := performer.Birthdate.Time
|
||||
age := cd.Year() - d.Year()
|
||||
if cd.YearDay() < d.YearDay() {
|
||||
// using YearDay screws up on leap years
|
||||
if cd.Month() < d.Month() || (cd.Month() == d.Month() && cd.Day() < d.Day()) {
|
||||
age = age - 1
|
||||
}
|
||||
|
||||
verifyInt(t, age, ageCriterion)
|
||||
if !verifyInt(t, age, ageCriterion) {
|
||||
t.Errorf("Performer birthdate: %s, deathdate: %s", performer.Birthdate.String(), performer.DeathDate.String())
|
||||
}
|
||||
}
|
||||
|
||||
return nil
|
||||
|
||||
Reference in New Issue
Block a user