Iridium icon indicating copy to clipboard operation
Iridium copied to clipboard

Blacklist

Open ParticleCore opened this issue 5 years ago • 7 comments

Implement the ability to block all videos from a channel.

ParticleCore avatar Nov 03 '19 18:11 ParticleCore

cant wait this feature !

koloved avatar Nov 18 '19 09:11 koloved

Would be great to have a workaround for situations like this (on Firefox): I blacklisted all CNN channels Then I do a search for cnn I end up seeing between zero to three videos per page. https://i.imgur.com/TyK4BpG.png

Attempting to find a solution I paired it with a greasemonkey script for infinite scroll: But as the new videos are loaded, Videos from Blacklisted channels are not removed anymore. (if only there would be a way to refresh the addon)

ClaudiuHNS avatar Nov 26 '19 16:11 ClaudiuHNS

at risk of sounding impatient, any news when the blacklist feature will work again? i just switched back from chrome to firefox recently and found out the whole addon has changed and my blacklist no longer works.

ghost avatar Dec 08 '19 22:12 ghost

I anticipate this feature so much. It will help to make search results free of political propaganda by blocking it. Especially in Russia. Thank you for your work.

Shellyoung avatar Nov 25 '20 15:11 Shellyoung

Since it has been a lot of time this needs to be evaluated again to see if it is still feasible.

ParticleCore avatar Dec 07 '23 15:12 ParticleCore

Targeting this implementation for 2.0.1 since it will be a significant integration and I don't want to rush it, but will definitely add it.

ParticleCore avatar Jan 07 '24 08:01 ParticleCore

Rough layout of the feature is taking shape, but might change a bit still before the final release:

image

Channels now have 2 ways of being identified, the legacy user channel id and the new handles. In order for the feature to properly work it will have to use either one so I am considering on making a network request when channels are entered manually to the list to ensure both IDs are present. To make things easier it will probably ignore any channels that do not have both IDs when importing them from a list.

ParticleCore avatar Jan 22 '24 00:01 ParticleCore

Setting configuration is mostly complete, the next stage will focus on blocking videos in YT pages:

1

The feature will not make use of @handles for anything other than channel name fallback.

Some channels can have empty names, such as youtube.com/@mrbeasts, in which case falling back to its channel handle allows the channel to list correctly in the options. The channel UID is immutable, so it will be used as a unique channel identifier.

The blacklist data object structure was preferred over lists due to its simplicity to uniquely index the channel id, and allows to quickly check if an id is already stored or not without having to iterate any list:

{
  "UCxxxxxxxxxxxx": {
    "name": "Channel name",
    "handle": "channelHandle"
  }
}

ParticleCore avatar Jan 27 '24 09:01 ParticleCore

The feature implementation on the YT side grew in complexity, but it is still feasible:

https://github.com/ParticleCore/Iridium/assets/9222661/b0b24cb1-f30a-424e-bf74-4864c079b569

However, unlike the previous implementation and because the main page is a dynamic type page, it will require the DOM to be updated manually and the internal data structure as well, otherwise whenever the page receives more items (as the user scrolls down, for example) the previously removed videos would show up again.

This scenario is not evident on other pages, such as the /watch pages.

Because of this the feature will have to ensure that both the DOM elements are removed (any video that belongs to a blocked channel) as well as the internal data structure reflects the same changes.

This is only an issue when a channel is blocked on a YT page, otherwise the filtering is already conducted at the data structure level, preventing videos from blocked channels from even loading at all.

ParticleCore avatar Jan 31 '24 02:01 ParticleCore

Currently debating whether to show the button over the thumbnail like old times image

or show it as a context menu option image

The thumbnail option has been quite cumbersome to get it working properly due to multiple issues:

  1. Hovering a thumbnail may start a preview player which is completely outside the thumbnail context, meaning I have to replicate the button on that inline preview player as well
  2. The inline preview is a fully fledged player, which means it might show items on the location of the button which makes things look bad
  3. To make the button visibility work correctly the z-index had to be messed with on multiple items
  4. The way to prevent the button from showing on the shorts thumbnails is very fragile, it does not use a sturdy logic
  5. There are some thumbnails (for example; the ones on the right side of the video watch page) that still use the old style buttons, so the blacklist button needs 2 styles to look right

The real only benefit of having that button showing on the thumbnail is its immediate visibility to the user, whereas in the context menu will require the user to click on the menu button to access the option.

On the other hand, the context menu implementation was very easy, it's more robust and has some flexibility. For example, it can show a warning to the user when trying to block a channel via vertical short thumbnail explaining it cannot be done for those types of thumbnails. Still debating on whether or not to do this, but it is an example of what can be done.

Will likely go with the context menu option since it is way easier to accomplish, and maintain.

ParticleCore avatar Feb 03 '24 17:02 ParticleCore