Fixed sync-anime
This commit is contained in:
parent
9cee62dd64
commit
aee7835889
@ -1,6 +1,7 @@
|
|||||||
package main
|
package main
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"encoding/json"
|
||||||
"fmt"
|
"fmt"
|
||||||
"strconv"
|
"strconv"
|
||||||
"strings"
|
"strings"
|
||||||
@ -58,6 +59,8 @@ func sync(data *kitsu.Anime) {
|
|||||||
anime.Rating.Overall = overall
|
anime.Rating.Overall = overall
|
||||||
|
|
||||||
// Trailers
|
// Trailers
|
||||||
|
anime.Trailers = []arn.AnimeTrailer{}
|
||||||
|
|
||||||
if attr.YoutubeVideoID != "" {
|
if attr.YoutubeVideoID != "" {
|
||||||
anime.Trailers = append(anime.Trailers, arn.AnimeTrailer{
|
anime.Trailers = append(anime.Trailers, arn.AnimeTrailer{
|
||||||
Service: "Youtube",
|
Service: "Youtube",
|
||||||
@ -72,6 +75,11 @@ func sync(data *kitsu.Anime) {
|
|||||||
if err == nil {
|
if err == nil {
|
||||||
status = color.GreenString("✔")
|
status = color.GreenString("✔")
|
||||||
} else {
|
} else {
|
||||||
|
color.Red(err.Error())
|
||||||
|
|
||||||
|
data, _ := json.MarshalIndent(anime, "", "\t")
|
||||||
|
fmt.Println(string(data))
|
||||||
|
|
||||||
status = color.RedString("✘")
|
status = color.RedString("✘")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user