Disabled third party image download
This commit is contained in:
parent
e57cc0fbeb
commit
7135733c29
@ -1,12 +1,9 @@
|
|||||||
package arn
|
package arn
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"net/http"
|
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
"github.com/aerogo/http/client"
|
|
||||||
"github.com/aerogo/nano"
|
"github.com/aerogo/nano"
|
||||||
"github.com/akyoto/color"
|
|
||||||
"github.com/animenotifier/kitsu"
|
"github.com/animenotifier/kitsu"
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -47,17 +44,17 @@ func NewAnimeFromKitsuAnime(kitsuAnime *kitsu.Anime) (*Anime, *AnimeCharacters,
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Download image
|
// Download image
|
||||||
response, err := client.Get(attr.PosterImage.Original).End()
|
// response, err := client.Get(attr.PosterImage.Original).End()
|
||||||
|
|
||||||
if err == nil && response.StatusCode() == http.StatusOK {
|
// if err == nil && response.StatusCode() == http.StatusOK {
|
||||||
err := anime.SetImageBytes(response.Bytes())
|
// err := anime.SetImageBytes(response.Bytes())
|
||||||
|
|
||||||
if err != nil {
|
// if err != nil {
|
||||||
color.Red("Couldn't set image for [%s] %s (%s)", anime.ID, anime, err.Error())
|
// color.Red("Couldn't set image for [%s] %s (%s)", anime.ID, anime, err.Error())
|
||||||
}
|
// }
|
||||||
} else {
|
// } else {
|
||||||
color.Red("No image for [%s] %s (%d)", anime.ID, anime, response.StatusCode())
|
// color.Red("No image for [%s] %s (%d)", anime.ID, anime, response.StatusCode())
|
||||||
}
|
// }
|
||||||
|
|
||||||
// Rating
|
// Rating
|
||||||
if anime.Rating.IsNotRated() {
|
if anime.Rating.IsNotRated() {
|
||||||
|
Loading…
Reference in New Issue
Block a user