mirror of
https://github.com/ajayyy/SponsorBlockServer.git
synced 2025-12-13 23:17:02 +03:00
Added youtube api cache (optional)
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user