Updated jobs
This commit is contained in:
parent
6a96585290
commit
27f04d6a2d
@ -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{
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user