mirror of
https://codeberg.org/video-prize-ranch/rimgo.git
synced 2025-07-19 17:38:23 +00:00
replace video with thumbnail
This commit is contained in:
parent
b8329145f1
commit
843008470a
@ -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(),
|
||||||
|
Loading…
Reference in New Issue
Block a user