diff --git a/jobs/mal-sync/mal-sync.go b/jobs/mal-sync/mal-sync.go index 0784ac4a..8bb827ae 100644 --- a/jobs/mal-sync/mal-sync.go +++ b/jobs/mal-sync/mal-sync.go @@ -100,12 +100,18 @@ func syncCharacter(character *arn.Character, malID string) { character.Name.Japanese = malCharacter.JapaneseName } - // Unless it's a manually created or edited character, - // update the description. - if character.CreatedBy == "" && character.EditedBy == "" { - description, attributes := parseCharacterDescription(malCharacter.Description) + if character.Name.Canonical == "" && malCharacter.Name != "" { character.Name.Canonical = malCharacter.Name + } + + allowUpdating := character.CreatedBy == "" && character.EditedBy == "" + description, attributes := parseCharacterDescription(malCharacter.Description) + + if (allowUpdating || character.Description == "") && description != "" { character.Description = description + } + + if allowUpdating { character.Attributes = attributes character.Spoilers = []arn.Spoiler{}