Skip to content

armgit / my-yt

Public Imported from GitHub
0

A clean and minimal youtube frontend, without all the ads and whistles

JavaScript

fix: avoid broacasting ignored videos in new-videos

Christian Feib4fab3f5dd00
diff --git a/index.js b/index.js
index 9ca235c..4555e69 100644
--- a/index.js
+++ b/index.js
@@ -25,7 +25,7 @@ async function main ({ port = 3000 } = {}) {
updateAndPersistVideos(repo, (err, data) => {
if (err) return console.error(err)
const { name, videos } = data
- const newVideos = videos.filter(v => v.addedAt > lastAdded)
+ const newVideos = videos.filter(v => v.addedAt > lastAdded).filter(v => !v.ignored)
lastAdded = Date.now()
if (newVideos.length > 0) {
console.log('new videos for channel', name, newVideos.length)