浏览代码

Fix broken reddit video & nsfw post thumbnails

Svilen Markov 6 月之前
父节点
当前提交
e546488aeb
共有 1 个文件被更改,包括 2 次插入2 次删除
  1. 2 2
      internal/feed/reddit.go

+ 2 - 2
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 {