Normalize all .jpeg to .jpg
This commit is contained in:
parent
4afbd202c3
commit
5a27ebf184
@ -52,18 +52,23 @@ func sync(data *kitsu.Anime) *arn.Anime {
|
||||
anime.Title.English = attr.Titles.En
|
||||
anime.Title.Romaji = attr.Titles.EnJp
|
||||
anime.Title.Synonyms = attr.AbbreviatedTitles
|
||||
anime.ImageExtension = filepath.Ext(kitsu.FixImageURL(attr.PosterImage.Original))
|
||||
anime.StartDate = attr.StartDate
|
||||
anime.EndDate = attr.EndDate
|
||||
anime.EpisodeCount = attr.EpisodeCount
|
||||
anime.EpisodeLength = attr.EpisodeLength
|
||||
anime.Status = attr.Status
|
||||
anime.ImageExtension = filepath.Ext(kitsu.FixImageURL(attr.PosterImage.Original))
|
||||
|
||||
// Status "unreleased" means the same as "upcoming" so we should normalize it
|
||||
if anime.Status == "unreleased" {
|
||||
anime.Status = "upcoming"
|
||||
}
|
||||
|
||||
// Normalize image extension to .jpg if .jpeg is used
|
||||
if anime.ImageExtension == ".jpeg" {
|
||||
anime.ImageExtension = ".jpg"
|
||||
}
|
||||
|
||||
anime.Summary = arn.FixAnimeDescription(attr.Synopsis)
|
||||
|
||||
if anime.Mappings == nil {
|
||||
|
@ -26,7 +26,7 @@ func main() {
|
||||
}
|
||||
|
||||
if _, err := os.Stat(base + ".jpeg"); err == nil {
|
||||
anime.ImageExtension = ".jpeg"
|
||||
anime.ImageExtension = ".jpg"
|
||||
anime.Save()
|
||||
continue
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user