From 7bce362eeb48f5b63a9efcc3d9ef02287fc87478 Mon Sep 17 00:00:00 2001 From: Eduard Urbach Date: Sat, 23 Sep 2017 18:55:33 +0200 Subject: [PATCH] Improved episode refresh --- jobs/refresh-episodes/refresh-episodes.go | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/jobs/refresh-episodes/refresh-episodes.go b/jobs/refresh-episodes/refresh-episodes.go index 3c000c48..bf0bae79 100644 --- a/jobs/refresh-episodes/refresh-episodes.go +++ b/jobs/refresh-episodes/refresh-episodes.go @@ -31,13 +31,13 @@ func main() { } } - color.Cyan("High priority queue:") + color.Cyan("High priority queue (%d):", len(highPriority)) refresh(highPriority) - color.Cyan("Medium priority queue:") + color.Cyan("Medium priority queue (%d):", len(mediumPriority)) refresh(mediumPriority) - color.Cyan("Low priority queue:") + color.Cyan("Low priority queue (%d):", len(lowPriority)) refresh(lowPriority) color.Green("Finished.") @@ -45,6 +45,8 @@ func main() { func refresh(queue []*arn.Anime) { for _, anime := range queue { + fmt.Println(anime.ID, "|", anime.Title.Canonical, "|", anime.GetMapping("shoboi/anime")) + episodeCount := len(anime.Episodes().Items) availableEpisodeCount := anime.Episodes().AvailableCount() @@ -57,7 +59,7 @@ func refresh(queue []*arn.Anime) { color.Red(err.Error()) } else { - fmt.Println(anime.ID, "|", anime.Title.Canonical, "|", "+"+strconv.Itoa(len(anime.Episodes().Items)-episodeCount)+" airing", "|", "+"+strconv.Itoa(anime.Episodes().AvailableCount()-availableEpisodeCount)+" available") + fmt.Println("+"+strconv.Itoa(len(anime.Episodes().Items)-episodeCount)+" airing", "|", "+"+strconv.Itoa(anime.Episodes().AvailableCount()-availableEpisodeCount)+" available") } } }