From ac83aca8a7e5b6238856e0955b5f298d8c07afa0 Mon Sep 17 00:00:00 2001 From: Eduard Urbach Date: Tue, 27 Mar 2018 06:07:52 +0200 Subject: [PATCH] New Kitsu character sync --- jobs/sync-characters/sync-characters.go | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/jobs/sync-characters/sync-characters.go b/jobs/sync-characters/sync-characters.go index 0215cd72..244e5bdd 100644 --- a/jobs/sync-characters/sync-characters.go +++ b/jobs/sync-characters/sync-characters.go @@ -21,7 +21,10 @@ func main() { character := &arn.Character{ ID: kitsuCharacter.ID, Name: arn.CharacterName{ - Canonical: kitsuCharacter.Attributes.Name, + Canonical: kitsuCharacter.Attributes.CanonicalName, + English: kitsuCharacter.Attributes.Names.En, + Japanese: kitsuCharacter.Attributes.Names.JaJp, + Synonyms: kitsuCharacter.Attributes.OtherNames, }, Image: arn.CharacterImage{ Extension: path.Ext(kitsu.FixImageURL(kitsuCharacter.Attributes.Image.Original)), @@ -95,6 +98,10 @@ func main() { character.Description = strings.Trim(character.Description, "\n\n") character.Save() + // Save Kitsu character in Kitsu DB + arn.Kitsu.Set("Character", kitsuCharacter.ID, kitsuCharacter) + + // Log fmt.Printf("%s %s %s\n", color.GreenString("✔"), character.ID, character.Name) }