amitbl / blocktube

YouTube™ content blocker
GNU General Public License v3.0
915 stars 66 forks source link

[Request] Block/allow by view count. #467

Open htAngryFace opened 1 day ago

htAngryFace commented 1 day ago

I literally do not want to see 64 view videos. That's all.

Thank!

f4grx commented 12 hours ago

You can do that with advanced blocking I guess, the video object passed to the filter function has a viewcount field.

https://github.com/amitbl/blocktube/wiki/Advanced-Blocking

Can you test it?

GithubAnon0000 commented 11 hours ago

It does work @f4grx @htAngryFace. Here is an example:

(video, objectType) => {

  // block videos with less than 1,000,000 views
  if (video.viewCount <= 1000000) {
    return true;
  }

  return false;
}

Very easy to do. Obviously replace the view count with your desired value.

nadir-advian commented 10 hours ago

@GithubAnon0000 it does not work with 0 views (No views) videos.

GithubAnon0000 commented 9 hours ago

@nadir-advian do you have an example video so that I can check? The condition would be video.viewCount < 1.