Skip to content

armgit / my-yt

Public Imported from GitHub
0

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

JavaScript

chore: logs ignored video

Christian Fei0d2c34beaa06
diff --git a/lib/repository.js b/lib/repository.js
index 48f9243..7f8cd4b 100644
--- a/lib/repository.js
+++ b/lib/repository.js
@@ -88,6 +88,7 @@ export default class Repository {
let videos = this.videos
.filter(v => query.excluded === 'true' ? !this.filterByExcludedTerms(v) : this.filterByExcludedTerms(v))
console.log('filtering by excluded', query.excluded === 'true', videos.length)
+ console.log('filterKeys.length', filterKeys.length)
if (query.filter) {
const searchTerm = query.filter.toLowerCase()
@@ -187,7 +188,9 @@ export default class Repository {
const index = this.videos.findIndex(v => v.id === id)
let ignored = false
if (index !== -1) {
- ignored = this.videos[index].ignored = !this.videos[index].ignored
+ this.videos[index].ignored = !this.videos[index].ignored
+ ignored = this.videos[index].ignored
+ console.log('toggled ignore video', ignored, this.videos[index].id)
} else {
console.log('cannot set video ignored, video does not exist', id)
}