Skip to content

Commit e546488

Browse files
committed
Fix broken reddit video & nsfw post thumbnails
1 parent f18620d commit e546488

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

internal/feed/reddit.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -111,8 +111,8 @@ func FetchSubredditPosts(subreddit, sort, topPeriod, search, commentsUrlTemplate
111111
TimePosted: time.Unix(int64(post.Time), 0),
112112
}
113113

114-
if post.Thumbnail != "" && post.Thumbnail != "self" && post.Thumbnail != "default" {
115-
forumPost.ThumbnailUrl = post.Thumbnail
114+
if post.Thumbnail != "" && post.Thumbnail != "self" && post.Thumbnail != "default" && post.Thumbnail != "nsfw" {
115+
forumPost.ThumbnailUrl = html.UnescapeString(post.Thumbnail)
116116
}
117117

118118
if !post.IsSelf {

0 commit comments

Comments
 (0)