Skip to content

Commit

Permalink
Fix broken reddit video & nsfw post thumbnails
Browse files Browse the repository at this point in the history
  • Loading branch information
svilenmarkov committed Dec 26, 2024
1 parent f18620d commit e546488
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions internal/feed/reddit.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit e546488

Please sign in to comment.