From e546488aebaa7cf8b2571ca2eaaf8f61f9ef58d8 Mon Sep 17 00:00:00 2001 From: Svilen Markov <7613769+svilenmarkov@users.noreply.github.com> Date: Thu, 26 Dec 2024 13:20:03 +0000 Subject: [PATCH] Fix broken reddit video & nsfw post thumbnails --- internal/feed/reddit.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/internal/feed/reddit.go b/internal/feed/reddit.go index 297020c7..77a6e898 100644 --- a/internal/feed/reddit.go +++ b/internal/feed/reddit.go @@ -111,8 +111,8 @@ func FetchSubredditPosts(subreddit, sort, topPeriod, search, commentsUrlTemplate TimePosted: time.Unix(int64(post.Time), 0), } - if post.Thumbnail != "" && post.Thumbnail != "self" && post.Thumbnail != "default" { - forumPost.ThumbnailUrl = post.Thumbnail + if post.Thumbnail != "" && post.Thumbnail != "self" && post.Thumbnail != "default" && post.Thumbnail != "nsfw" { + forumPost.ThumbnailUrl = html.UnescapeString(post.Thumbnail) } if !post.IsSelf {