Fixed linter errors
This commit is contained in:
@ -1,12 +0,0 @@
|
||||
package main
|
||||
|
||||
import "github.com/animenotifier/notify.moe/arn"
|
||||
|
||||
func main() {
|
||||
defer arn.Node.Close()
|
||||
|
||||
for episodes := range arn.StreamAnimeEpisodes() {
|
||||
episodes.Sort()
|
||||
episodes.Save()
|
||||
}
|
||||
}
|
@ -1,22 +0,0 @@
|
||||
package main
|
||||
|
||||
import "github.com/animenotifier/notify.moe/arn"
|
||||
|
||||
func main() {
|
||||
defer arn.Node.Close()
|
||||
|
||||
for episodes := range arn.StreamAnimeEpisodes() {
|
||||
anime := episodes.Anime()
|
||||
anime.EpisodeIDs = nil
|
||||
|
||||
for _, episode := range episodes.Items {
|
||||
episode.ID = arn.GenerateID("Episode")
|
||||
episode.AnimeID = anime.ID
|
||||
episode.Save()
|
||||
|
||||
anime.EpisodeIDs = append(anime.EpisodeIDs, episode.ID)
|
||||
}
|
||||
|
||||
anime.Save()
|
||||
}
|
||||
}
|
@ -15,8 +15,6 @@ func main() {
|
||||
futureThreshold := 8 * 7 * 24 * time.Hour
|
||||
|
||||
for anime := range arn.StreamAnime() {
|
||||
modified := false
|
||||
|
||||
// Try to find incorrect airing dates
|
||||
for _, episode := range anime.Episodes() {
|
||||
if episode.AiringDate.Start == "" {
|
||||
@ -35,12 +33,7 @@ func main() {
|
||||
// Delete the wrong airing date
|
||||
episode.AiringDate.Start = ""
|
||||
episode.AiringDate.End = ""
|
||||
|
||||
modified = true
|
||||
}
|
||||
|
||||
if modified {
|
||||
anime.Episodes().Save()
|
||||
episode.Save()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user