From 2b9200e3c1dc2bfaec1ffb12b96f4d4aa2cab8df Mon Sep 17 00:00:00 2001 From: Logan Rockmore Date: Tue, 5 Jan 2021 11:52:51 -0500 Subject: [PATCH] Only show the YouTube thumbnail image if the video is not embedded. --- lib/routes/youtube/channel.js | 4 ++-- lib/routes/youtube/playlist.js | 4 ++-- lib/routes/youtube/user.js | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/lib/routes/youtube/channel.js b/lib/routes/youtube/channel.js index 006940e3ccfd87..1fc89ac5a8a3ca 100644 --- a/lib/routes/youtube/channel.js +++ b/lib/routes/youtube/channel.js @@ -25,8 +25,8 @@ module.exports = async (ctx) => { return { title: snippet.title, description: `${ - embed ? '' : '' - }${utils.formatDescription(snippet.description)}`, + embed ? '' : '' + }${utils.formatDescription(snippet.description)}`, pubDate: new Date(snippet.publishedAt).toUTCString(), link: `https://www.youtube.com/watch?v=${videoId}`, }; diff --git a/lib/routes/youtube/playlist.js b/lib/routes/youtube/playlist.js index bfd420f62c9d10..4f7783f313e1e1 100644 --- a/lib/routes/youtube/playlist.js +++ b/lib/routes/youtube/playlist.js @@ -24,8 +24,8 @@ module.exports = async (ctx) => { const img = utils.getThumbnail(snippet.thumbnails); return { title: snippet.title, - description: `${embed ? '' : ''} - ${utils.formatDescription(snippet.description)}`, + description: `${embed ? '' : ''} + ${utils.formatDescription(snippet.description)}`, pubDate: new Date(snippet.publishedAt).toUTCString(), link: `https://www.youtube.com/watch?v=${videoId}`, author: authors[index].snippet.channelTitle, diff --git a/lib/routes/youtube/user.js b/lib/routes/youtube/user.js index 969466f16cb529..fd0eee47c99b3c 100644 --- a/lib/routes/youtube/user.js +++ b/lib/routes/youtube/user.js @@ -25,8 +25,8 @@ module.exports = async (ctx) => { return { title: snippet.title, description: `${ - embed ? '' : '' - }${utils.formatDescription(snippet.description)}`, + embed ? '' : '' + }${utils.formatDescription(snippet.description)}`, pubDate: new Date(snippet.publishedAt).toUTCString(), link: `https://www.youtube.com/watch?v=${videoId}`, };