Added youtube api cache (optional)

This commit is contained in:
Joe Dowd
2020-09-08 17:37:29 +01:00
parent b79f740e2b
commit 9d94067cd0
9 changed files with 311 additions and 14 deletions

View File

@@ -48,10 +48,7 @@ function sendWebhooks(voteData) {
}
if (config.youtubeAPIKey !== null) {
YouTubeAPI.videos.list({
part: "snippet",
id: submissionInfoRow.videoID
}, function (err, data) {
YouTubeAPI.listVideos(submissionInfoRow.videoID, "snippet", (err, data) => {
if (err || data.items.length === 0) {
err && logger.error(err);
return;