Updated jobs
This commit is contained in:
parent
6a96585290
commit
27f04d6a2d
@ -7,7 +7,6 @@ import (
|
|||||||
"path"
|
"path"
|
||||||
"runtime"
|
"runtime"
|
||||||
"sort"
|
"sort"
|
||||||
"strings"
|
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
_ "image/gif"
|
_ "image/gif"
|
||||||
@ -66,10 +65,6 @@ func main() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func work(anime *arn.Anime) error {
|
func work(anime *arn.Anime) error {
|
||||||
if !strings.HasPrefix(anime.Image.Original, "//media.kitsu.io/anime/") {
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
<-ticker.C
|
<-ticker.C
|
||||||
|
|
||||||
originals := path.Join(os.Getenv("GOPATH"), "/src/github.com/animenotifier/notify.moe/images/anime/original/")
|
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
|
webpQuality := 70
|
||||||
jpegQuality := 70
|
jpegQuality := 70
|
||||||
|
|
||||||
|
kitsuOriginal := fmt.Sprintf("https://media.kitsu.io/anime/poster_images/%s/original", anime.ID)
|
||||||
|
|
||||||
system := ipo.System{
|
system := ipo.System{
|
||||||
Inputs: []ipo.Input{
|
Inputs: []ipo.Input{
|
||||||
&inputs.FileSystemImage{
|
&inputs.FileSystemImage{
|
||||||
@ -99,7 +96,7 @@ func work(anime *arn.Anime) error {
|
|||||||
URL: path.Join(originals, anime.ID+".gif"),
|
URL: path.Join(originals, anime.ID+".gif"),
|
||||||
},
|
},
|
||||||
&inputs.NetworkImage{
|
&inputs.NetworkImage{
|
||||||
URL: anime.Image.Original,
|
URL: kitsuOriginal + anime.ImageExtension,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
Outputs: []ipo.Output{
|
Outputs: []ipo.Output{
|
||||||
|
@ -38,7 +38,6 @@ func sync(data *kitsu.Anime) *arn.Anime {
|
|||||||
if strings.Contains(err.Error(), "not found") {
|
if strings.Contains(err.Error(), "not found") {
|
||||||
anime = &arn.Anime{
|
anime = &arn.Anime{
|
||||||
Title: &arn.AnimeTitle{},
|
Title: &arn.AnimeTitle{},
|
||||||
Image: &arn.AnimeImageTypes{},
|
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
panic(err)
|
panic(err)
|
||||||
@ -84,7 +83,7 @@ func sync(data *kitsu.Anime) *arn.Anime {
|
|||||||
anime.AddMapping("myanimelist/anime", mapping.Attributes.ExternalID, "")
|
anime.AddMapping("myanimelist/anime", mapping.Attributes.ExternalID, "")
|
||||||
case "anidb":
|
case "anidb":
|
||||||
anime.AddMapping("anidb/anime", mapping.Attributes.ExternalID, "")
|
anime.AddMapping("anidb/anime", mapping.Attributes.ExternalID, "")
|
||||||
case "thetvdb/series":
|
case "thetvdb", "thetvdb/series":
|
||||||
anime.AddMapping("thetvdb/anime", mapping.Attributes.ExternalID, "")
|
anime.AddMapping("thetvdb/anime", mapping.Attributes.ExternalID, "")
|
||||||
case "thetvdb/season":
|
case "thetvdb/season":
|
||||||
// Ignore
|
// Ignore
|
||||||
|
Loading…
Reference in New Issue
Block a user