Added anime characters fix
This commit is contained in:
parent
2e9ad4bf6f
commit
60c0baa9ab
25
patches/anime-characters-fix/anime-characters-fix.go
Normal file
25
patches/anime-characters-fix/anime-characters-fix.go
Normal 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)
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user