29 lines
412 B
Go
Raw Normal View History

2017-07-15 17:31:34 +00:00
package main
import (
"fmt"
"github.com/animenotifier/arn"
)
func main() {
count := 0
for anime := range arn.MustStreamAnime() {
episodes := anime.Episodes()
if episodes == nil {
episodes = &arn.AnimeEpisodes{
AnimeID: anime.ID,
Items: []*arn.AnimeEpisode{},
}
if episodes.Save() == nil {
count++
}
}
}
fmt.Println("Added empty anime episodes to", count, "anime.")
}