Cleanup
This commit is contained in:
parent
5b77fa98cc
commit
b0539f42a5
@ -1,25 +0,0 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
|
||||
"github.com/animenotifier/arn"
|
||||
)
|
||||
|
||||
func main() {
|
||||
defer arn.Node.Close()
|
||||
|
||||
for anime := range arn.StreamAnime() {
|
||||
relations, _ := arn.GetAnimeRelations(anime.ID)
|
||||
|
||||
if relations == nil {
|
||||
relations := &arn.AnimeRelations{
|
||||
AnimeID: anime.ID,
|
||||
Items: []*arn.AnimeRelation{},
|
||||
}
|
||||
|
||||
arn.DB.Set("AnimeRelations", anime.ID, relations)
|
||||
fmt.Println(anime.ID, anime.Title.Canonical)
|
||||
}
|
||||
}
|
||||
}
|
@ -1,24 +0,0 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"time"
|
||||
|
||||
"github.com/animenotifier/arn"
|
||||
"github.com/fatih/color"
|
||||
)
|
||||
|
||||
func main() {
|
||||
color.Yellow("Adding kitsu/anime mappings")
|
||||
|
||||
defer color.Green("Finished")
|
||||
defer arn.Node.Close()
|
||||
|
||||
for anime := range arn.StreamAnime() {
|
||||
fmt.Println(anime.ID, anime)
|
||||
anime.SetMapping("kitsu/anime", anime.ID)
|
||||
anime.Save()
|
||||
}
|
||||
|
||||
time.Sleep(time.Second)
|
||||
}
|
Loading…
Reference in New Issue
Block a user