Updated sync tool
This commit is contained in:
parent
65851b9128
commit
487df034d4
@ -30,9 +30,14 @@ func main() {
|
||||
}
|
||||
}
|
||||
|
||||
func sync(data *kitsu.Anime) *arn.Anime {
|
||||
func sync(data *kitsu.Anime) {
|
||||
anime, err := arn.GetAnime(data.ID)
|
||||
|
||||
// This stops overwriting existing data
|
||||
if err == nil || anime != nil {
|
||||
return
|
||||
}
|
||||
|
||||
if err != nil {
|
||||
if strings.Contains(err.Error(), "not found") {
|
||||
anime = &arn.Anime{
|
||||
@ -150,6 +155,4 @@ func sync(data *kitsu.Anime) *arn.Anime {
|
||||
|
||||
// Log
|
||||
fmt.Println(color.GreenString("✔"), anime.ID, anime.Title.Canonical)
|
||||
|
||||
return anime
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user