mirror of
https://github.com/ultrasn0w/huso.git
synced 2025-12-13 10:29:52 +01:00
Feature: MAL URL
This commit is contained in:
1
klotz.go
1
klotz.go
@@ -22,6 +22,7 @@ type Anime struct {
|
||||
ImageMediumURL string `json:"imageMedium"`
|
||||
ImageLargeURL string `json:"imageLarge"`
|
||||
ImageThumbURL string `json:"imageThumb"`
|
||||
URL string `json:"url"`
|
||||
Type string `json:"type"`
|
||||
Status string `json:"status"`
|
||||
Episodes int `json:"episodes"`
|
||||
|
||||
@@ -46,6 +46,7 @@ func JikanConvert(jik *SeasonAnimeJikan) Anime {
|
||||
Name: s.Name,
|
||||
})
|
||||
}
|
||||
res.URL = fmt.Sprintf("https://myanimelist.net/anime/%d", res.Anime)
|
||||
return res
|
||||
}
|
||||
|
||||
@@ -87,6 +88,7 @@ func MalConvert(mal *AnimeDetailMal) Anime {
|
||||
}
|
||||
res.StartDate, _ = time.Parse("2006-01-02", mal.StartDate)
|
||||
res.EndDate, _ = time.Parse("2006-01-02", mal.EndDate)
|
||||
res.URL = fmt.Sprintf("https://myanimelist.net/anime/%d", res.Anime)
|
||||
return res
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user