Skip to content

Conversation

@mstudio005
Copy link

@mstudio005 mstudio005 commented Nov 11, 2025

What is it?

  • Bugfix (user facing)
  • Feature (user facing)
  • Codebase improvement (dev facing)
  • Meta improvement to the project (dev facing)

Description of the changes in your PR

  • Add BlockedChannelsManager utility class for local storage using SharedPreferences
  • Implement automatic filtering of blocked channels in Trending, Search, and Recommendations
  • Add Block Channel option in video long-press context menu with undo support
  • Create Blocked Channels management screen in Settings → Content
  • Add necessary string resources for UI
  • Update gradle.properties to use Java 17 for build compatibility

Before/After Screenshots or Screen Record

Before:
Screenshot_20251112_081656_NewPipe
Screenshot_20251112_081731_NewPipe

After:
Shows new “Block Channel” option in the video overflow menu, and “Blocked Channels” section under Settings → Content.
Screenshot_20251111_235524_NewPipe Debug
Screenshot_20251111_235536_NewPipe Debug
Screenshot_20251112_055750_NewPipe Debug

Fixes the following issue(s)

Relies on the following changes

  • None

APK testing

The APK can be found by going to the Checks tab below the title.
On the left pane, click CI, scroll down to artifacts, and click app to download the debug APK of this PR. This is also tested in Samsung Tablet

Due diligence

- Add BlockedChannelsManager utility class for local storage using SharedPreferences
- Implement automatic filtering of blocked channels in Trending, Search, and Recommendations
- Add 'Block Channel' option in video long-press context menu with undo support
- Create Blocked Channels management screen in Settings > Content
- Add comprehensive string resources for the feature
- Update gradle.properties to use Java 17 for build compatibility

Features:
* BlockedChannelsManager: Manages blocked channel IDs via SharedPreferences
* InfoListAdapter: Filters out videos from blocked channels automatically
* StreamDialogDefaultEntry: New BLOCK_CHANNEL entry with Snackbar undo
* BlockedChannelsFragment: UI for viewing and managing blocked channels
* Settings integration: Accessible via Settings > Content > Blocked Channels

Tested:
- Debug APK build successful
- All code passes checkstyle and ktlint validation
- Feature follows MVVM architecture and NewPipe coding standards
@github-actions github-actions bot added the size/large PRs with less than 750 changed lines label Nov 11, 2025
@mstudio005
Copy link
Author

Hi maintainers 👋

This PR fully implements feature request #12647 — Block Channels.

Summary

  • Adds BlockedChannelsManager for local storage (SharedPreferences)
  • Integrates filtering in Trending, Search, and Related lists
  • Adds Block Channel action in video detail overflow with Undo
  • Adds Blocked Channels settings screen for management
  • Tested via debug APK — verified working smoothly ✅

The feature follows MVVM + NewPipe coding standards and uses existing components cleanly.
All Gradle builds, lint, and style checks pass.

Would appreciate a review whenever convenient 🙏
Thanks for keeping this project awesome ❤️

@mstudio005 mstudio005 mentioned this pull request Nov 11, 2025
6 tasks
Copy link
Contributor

@TobiGr TobiGr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hello and thank you for the PR.

  1. Please do not open AI generated PRs. They lack the required info and code quality.
  2. Feature requests should target the refactor branch because the app is ondergoing a rewrite and the dev branch is only used for fixes.
  3. Please test your changes on different screen sizes (phones, tablets, TV)
  4. Ensure that our theme is used, the texts are all readable and the contrast is good.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

revert this

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Display the channel name and not the URL. Fix the button size and color.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Blocked channels should be stored in their own DB table with url and name so that the name can be displayed to the user.

// Unblock the channel
BlockedChannelsManager.INSTANCE.unblockChannel(
fragment.requireContext(), uploaderUrl);
});
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

.setActionTextColor(Color.YELLOW)

@mstudio005
Copy link
Author

Hello and thank you for the PR.

  1. Please do not open AI generated PRs. They lack the required info and code quality.
  2. Feature requests should target the refactor branch because the app is ondergoing a rewrite and the dev branch is only used for fixes.
  3. Please test your changes on different screen sizes (phones, tablets, TV)
  4. Ensure that our theme is used, the texts are all readable and the contrast is good.

Hi @TobiGr, thanks for the review and the clear feedback.

About AI usage: The code in this PR is entirely written by hand, without AI code generation. AI was only used to help with documentation and writing clearer messages, not for producing or modifying the actual code.

Target branch: Understood about using the refactor branch for feature work. The next update for this feature will be adjusted to go through the refactor branch instead of dev.

Testing and screen sizes: This feature has already been tested on different screen sizes, including phones and a Samsung tablet, and it behaved correctly. After applying the requested changes, it will be tested again on multiple devices (phones, tablets, and TV where possible) to confirm everything still works as expected.

UI and readability: The UI will be updated as requested: the blocked list will display the channel name instead of the URL, the button size and color will be adjusted, and the app theme will be respected. Extra care will be taken so that all text is clearly visible and the contrast is good on all supported themes.

@gc-user
Copy link

gc-user commented Jan 5, 2026

Thanks for implementing this feature! With ai channels spreading like cancer this feature gets more important with each passing day...

Will the list of blocked channels be ex- and importable? E.g. ex-/imported together with the settings?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size/large PRs with less than 750 changed lines

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Block Channels

3 participants