Refresh episodes
This commit is contained in:
parent
f9bbf7e6db
commit
f82e1ea961
20
jobs/refresh-episodes/refresh-episodes.go
Normal file
20
jobs/refresh-episodes/refresh-episodes.go
Normal 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.")
|
||||||
|
}
|
@ -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 != "" {
|
||||||
|
Loading…
Reference in New Issue
Block a user