replace video with thumbnail

This commit is contained in:
orangix
2023-08-15 21:03:13 +02:00
parent b8329145f1
commit 843008470a

View File

@@ -172,6 +172,10 @@ func parseSubmission(value gjson.Result) Submission {
Id: c.Get("id").String(), Id: c.Get("id").String(),
Url: strings.ReplaceAll(c.Get("url").String(), "https://i.imgur.com", ""), Url: strings.ReplaceAll(c.Get("url").String(), "https://i.imgur.com", ""),
} }
// Replace with thumbnails here because it's easier.
if cover.Url[len(cover.Url)-3:] == "mp4" {
cover.Url = cover.Url[:len(cover.Url)-3] + "webp"
}
default: default:
cover = Media{ cover = Media{
Id: value.Get("id").String(), Id: value.Get("id").String(),