mirror of
https://codeberg.org/video-prize-ranch/rimgo.git
synced 2025-07-20 09:58:23 +00:00
fix panic
This commit is contained in:
parent
843008470a
commit
21ebabdde3
@ -173,7 +173,7 @@ func parseSubmission(value gjson.Result) Submission {
|
|||||||
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.
|
// Replace with thumbnails here because it's easier.
|
||||||
if cover.Url[len(cover.Url)-3:] == "mp4" {
|
if strings.HasSuffix(cover.Url, ".mp4") {
|
||||||
cover.Url = cover.Url[:len(cover.Url)-3] + "webp"
|
cover.Url = cover.Url[:len(cover.Url)-3] + "webp"
|
||||||
}
|
}
|
||||||
default:
|
default:
|
||||||
|
Loading…
Reference in New Issue
Block a user