Refresh episodes

This commit is contained in:
Eduard Urbach 2017-07-02 14:03:56 +02:00
parent f9bbf7e6db
commit f82e1ea961
2 changed files with 21 additions and 2 deletions

View File

@ -0,0 +1,20 @@
package main
import (
"github.com/animenotifier/arn"
"github.com/fatih/color"
)
func main() {
color.Yellow("Refreshing episode information for each anime.")
for anime := range arn.MustStreamAnime() {
err := anime.RefreshEpisodes()
if err != nil {
color.Red(err.Error())
}
}
color.Green("Finished.")
}

View File

@ -1,7 +1,6 @@
package main package main
import ( import (
"os"
"time" "time"
"github.com/animenotifier/arn" "github.com/animenotifier/arn"
@ -39,7 +38,7 @@ func sync(anime *arn.Anime) bool {
} }
// Log ID and title // Log ID and title
os.Stdout.Write([]byte(anime.ID + " | [JP] " + anime.Title.Japanese + " | [EN] " + anime.Title.English)) print(anime.ID + " | [JP] " + anime.Title.Japanese + " | [EN] " + anime.Title.Canonical)
// Search Japanese title // Search Japanese title
if anime.GetMapping("shoboi/anime") == "" && anime.Title.Japanese != "" { if anime.GetMapping("shoboi/anime") == "" && anime.Title.Japanese != "" {