Disabled old patch

This commit is contained in:
2017-06-27 16:31:30 +02:00
parent 50cd062140
commit 990a8032f3

@ -1,34 +1,38 @@
package main package main
import (
"github.com/animenotifier/arn"
"github.com/fatih/color"
)
func main() { func main() {
// Get a stream of all anime
allAnime, err := arn.AllAnime()
if err != nil {
panic(err)
} }
// Iterate over the stream // import (
for _, anime := range allAnime { // "github.com/animenotifier/arn"
for _, trailer := range anime.Trailers { // "github.com/fatih/color"
// )
// func main() {
// // Get a stream of all anime
// allAnime, err := arn.AllAnime()
// if err != nil {
// panic(err)
// }
// // Iterate over the stream
// for _, anime := range allAnime {
// for _, trailer := range anime.Trailers {
// // trailer.ServiceID = trailer.DeprecatedVideoID
// println(trailer.DeprecatedVideoID)
// trailer.ServiceID = trailer.DeprecatedVideoID // trailer.ServiceID = trailer.DeprecatedVideoID
println(trailer.DeprecatedVideoID) // }
trailer.ServiceID = trailer.DeprecatedVideoID
}
if anime.Trailers == nil { // if anime.Trailers == nil {
anime.Trailers = []*arn.ExternalMedia{} // anime.Trailers = []*arn.ExternalMedia{}
} // }
err := anime.Save() // err := anime.Save()
if err != nil { // if err != nil {
color.Red("Error saving anime: %v", err) // color.Red("Error saving anime: %v", err)
} // }
} // }
} // }