Standardize the titles and descriptions for the YouTube RSS feeds.

This commit is contained in:
Logan Rockmore
2021-01-05 11:30:43 -05:00
parent f0c44b172f
commit f9649d4dfd
3 changed files with 6 additions and 6 deletions
+2 -2
View File
@@ -13,9 +13,9 @@ module.exports = async (ctx) => {
const data = (await utils.getPlaylistItems(playlistId, 'snippet,contentDetails')).data.items;
ctx.state.data = {
title: `${data[0].snippet.channelTitle} 的 YouTube 视频`,
title: `${data[0].snippet.channelTitle} - YouTube`,
link: `https://www.youtube.com/channel/${id}`,
description: `${data[0].snippet.channelTitle} 的 YouTube 视频`,
description: `YouTube channel ${data[0].snippet.channelTitle}`,
item: data
.filter((d) => d.snippet.title !== 'Private video' && d.snippet.title !== 'Deleted video')
.map((item) => {
+2 -2
View File
@@ -15,9 +15,9 @@ module.exports = async (ctx) => {
const authors = (await utils.getVideoAuthor(ids, 'snippet')).data.items;
ctx.state.data = {
title: `Playlist: ${playlistTitle} by ${data[0].snippet.channelTitle}`,
title: `${playlistTitle} by ${data[0].snippet.channelTitle} - YouTube`,
link: `https://www.youtube.com/playlist?list=${id}`,
description: `Playlist: ${playlistTitle} by ${data[0].snippet.channelTitle}`,
description: `YouTube playlist ${playlistTitle} by ${data[0].snippet.channelTitle}`,
item: data.map((item, index) => {
const snippet = item.snippet;
const videoId = snippet.resourceId.videoId;
+2 -2
View File
@@ -13,9 +13,9 @@ module.exports = async (ctx) => {
const data = (await utils.getPlaylistItems(playlistId, 'snippet,contentDetails')).data.items;
ctx.state.data = {
title: `${username} 的 YouTube 视频`,
title: `${username} - YouTube`,
link: `https://www.youtube.com/user/${username}`,
description: `${username} 的 YouTube 视频`,
description: `YouTube user ${username}`,
item: data
.filter((d) => d.snippet.title !== 'Private video' && d.snippet.title !== 'Deleted video')
.map((item) => {