Updated jobs

This commit is contained in:
Eduard Urbach 2017-11-09 20:03:25 +01:00
parent 6a96585290
commit 27f04d6a2d
2 changed files with 4 additions and 8 deletions

View File

@ -7,7 +7,6 @@ import (
"path"
"runtime"
"sort"
"strings"
"time"
_ "image/gif"
@ -66,10 +65,6 @@ func main() {
}
func work(anime *arn.Anime) error {
if !strings.HasPrefix(anime.Image.Original, "//media.kitsu.io/anime/") {
return nil
}
<-ticker.C
originals := path.Join(os.Getenv("GOPATH"), "/src/github.com/animenotifier/notify.moe/images/anime/original/")
@ -84,6 +79,8 @@ func work(anime *arn.Anime) error {
webpQuality := 70
jpegQuality := 70
kitsuOriginal := fmt.Sprintf("https://media.kitsu.io/anime/poster_images/%s/original", anime.ID)
system := ipo.System{
Inputs: []ipo.Input{
&inputs.FileSystemImage{
@ -99,7 +96,7 @@ func work(anime *arn.Anime) error {
URL: path.Join(originals, anime.ID+".gif"),
},
&inputs.NetworkImage{
URL: anime.Image.Original,
URL: kitsuOriginal + anime.ImageExtension,
},
},
Outputs: []ipo.Output{

View File

@ -38,7 +38,6 @@ func sync(data *kitsu.Anime) *arn.Anime {
if strings.Contains(err.Error(), "not found") {
anime = &arn.Anime{
Title: &arn.AnimeTitle{},
Image: &arn.AnimeImageTypes{},
}
} else {
panic(err)
@ -84,7 +83,7 @@ func sync(data *kitsu.Anime) *arn.Anime {
anime.AddMapping("myanimelist/anime", mapping.Attributes.ExternalID, "")
case "anidb":
anime.AddMapping("anidb/anime", mapping.Attributes.ExternalID, "")
case "thetvdb/series":
case "thetvdb", "thetvdb/series":
anime.AddMapping("thetvdb/anime", mapping.Attributes.ExternalID, "")
case "thetvdb/season":
// Ignore