Added anime characters fix

This commit is contained in:
Eduard Urbach 2019-11-04 16:54:34 +09:00
parent 2e9ad4bf6f
commit 60c0baa9ab
Signed by: akyoto
GPG Key ID: C874F672B1AF20C0

View File

@ -0,0 +1,25 @@
package main
import (
"github.com/akyoto/color"
"github.com/animenotifier/notify.moe/arn"
)
func main() {
defer arn.Node.Close()
count := 0
for anime := range arn.StreamAnime() {
if anime.Characters() == nil {
characters := &arn.AnimeCharacters{
AnimeID: anime.ID,
Items: nil,
}
characters.Save()
count++
}
}
color.Green("Added %d missing AnimeCharacter objects", count)
}