feat: Add the feature to blacklist channels #5375
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Pull Request: Channel Blacklist System
🎯 Feature Overview
This PR implements a comprehensive channel blacklisting system that allows users to permanently hide all content from specific channels across the entire SmartTube application.
🚀 Key Features
1. Blacklist via Context Menu
2. Global Content Filtering
3. Blacklisted Channels Management Tab
4. Live UI Refresh
5. Data Persistence
6. Internationalization
📝 Implementation Details
Architecture
The blacklist system uses a multi-layer architecture:
Data Layer (BlacklistData.java)
Filtering Layer (VideoGroup.java)
UI Layer
Files Changed
Core Implementation
common/src/main/java/com/liskovsoft/smartyoutubetv2/common/prefs/BlacklistData.java ⭐ NEW
common/src/main/java/com/liskovsoft/smartyoutubetv2/common/app/models/data/VideoGroup.java
common/src/main/java/com/liskovsoft/smartyoutubetv2/common/app/presenters/dialogs/menu/VideoMenuPresenter.java
common/src/main/java/com/liskovsoft/smartyoutubetv2/common/app/presenters/BrowsePresenter.java
getBlacklistedChannelsVideos()data sourceSupporting Files
common/src/main/java/com/liskovsoft/smartyoutubetv2/common/app/models/data/Video.java
MediaServiceCore/mediaserviceinterfaces/src/main/java/com/liskovsoft/mediaserviceinterfaces/data/MediaGroup.java
TYPE_BLACKLISTED_CHANNELS = 22constantcommon/src/main/java/com/liskovsoft/smartyoutubetv2/common/prefs/MainUIData.java
MENU_ITEM_BLACKLIST_CHANNELconstantcommon/src/main/java/com/liskovsoft/smartyoutubetv2/common/app/presenters/service/SidebarService.java
Localization (17 languages)
String Resources Added
✅ Testing Performed
Build Status
./gradlew assembleStstableDebugFunctional Testing
✅ Context Menu Integration
✅ Global Filtering
✅ Blacklisted Channels Tab
✅ Live Refresh
✅ Persistence
✅ Translations
🎮 How to Use
To Blacklist a Channel:
To View Blacklisted Channels:
To Unblacklist a Channel:
🔄 Backward Compatibility
📊 Code Quality
🤝 Contribution Notes
This feature was developed with:
📌 Related Issues
#4471
#2242
#1956
#4471
#2242
#1956
#904
🙏 Acknowledgments
Thank you to the SmartTube community and maintainers @yuliskov for creating such an excellent app!