FrostCo / AdvancedProfanityFilter

A browser extension to filter profanity from webpages
GNU General Public License v3.0
163 stars 26 forks source link

Discovery+ no longer filtering #550

Closed Jenron3000 closed 4 months ago

Jenron3000 commented 5 months ago

:bug: Discovery+ no longer muting audio

I have tried advanced and deep filtering options as well as changing from browser mute, to video mute, ect. Something changed because it has been working wonderfully. The captions are being filter but the audio doesn't mute I've tried multiple browsers to no avail. Something changed because it has been working wonderfully. Thank you so much for your work on this filter.

:computer: Details

richardfrost commented 5 months ago

Hi @Jenron3000, thanks for reporting the issue. I'm glad that you are enjoying the filter when it is working for you though! Hopefully we can get it fixed up again.

It looks like Discovery+ has changed quite a bit about their website, but I do have a potential update that will hopefully fix it. Could you give it a try and let me know how it works for you?

{
  "www.discoveryplus.com": [
    {
      "className": "sc-iMWBiJ",
      "mode": "element",
      "subtitleSelector": "div.sc-ihgnxF",
      "tagName": "div"
    }
  ]
}

To use this config, paste it into the Custom Sites area (Options page > Audio tab) and click the blue "SAVE" button underneath it. Then, make sure to refresh the tab for the video site (if you have it open still) and it will load this new configuration.

If you do find an issue with it, please let me know what video and an approximate timestamp so I can make sure to get it fixed.

richardfrost commented 5 months ago

Sorry @Jenron3000, I did some more testing with that config I shared earlier and it definitely has some issues. This one should work much better:

{
  "www.discoveryplus.com": [
    {
      "apfCaptions": true,
      "apfCaptionsSelector": "div#overlay-root",
      "displaySelector": "div[data-testid=caption_renderer_overlay]",
      "mode": "watcher",
      "subtitleSelector": "div[data-testid=caption_renderer_overlay] div.sc-iMWBiJ div.sc-ihgnxF",
      "videoSelector": "div[data-testid=caption_renderer_overlay] video"
    }
  ]
}
Jenron3000 commented 5 months ago

I tried dropping that code in and it still only blocks the caption and doesn't mute the audio. Should it change the code in the "supported sites config" list? after i save the code it doesn't change it.

richardfrost commented 5 months ago

Thanks for getting back to me @Jenron3000. Good question, but it won't change the "support sites config" in the list, those are just the built-in configs and are read-only.

I'm sorry, I just noticed both a typo and an error in the 2nd config I shared with you. Could you please try this one?

{
  "www.discoveryplus.com": [
    {
      "apfCaptions": true,
      "apfCaptionsSelector": "div#overlay-root",
      "displaySelector": "div[data-testid=caption_renderer_overlay]",
      "mode": "watcher",
      "subtitleSelector": "div[data-testid=caption_renderer_overlay] div.sc-iMWBiJ div.sc-ihgnxF",
      "videoSelector": "div[data-testid=video-container] video"
    }
  ]
}

Also, please make sure the site is set to normal (not Advanced or Deep).

If this one still doesn't work, can you share an example video so I can test it? Thanks!

richardfrost commented 5 months ago

@Jenron3000 When you get a chance let me know if this latest version works for you. Sorry again for the errors in the previous configs.

Jenron3000 commented 5 months ago

Yes it’s working excellently now with discovery plus! Thank you!

richardfrost commented 4 months ago

Thanks for letting me know @Jenron3000.

This has been included in version 3.5.0 of the extension. For best results, make sure to remove any custom config used for testing like this once it has been included in the official update so you can automatically get future updates.