Skip to content

Feat/block channels refactor - #13491

Closed
mstudio005 wants to merge 380 commits into
TeamNewPipe:devfrom
mstudio005:feat/block-channels-refactor
Closed

Feat/block channels refactor#13491
mstudio005 wants to merge 380 commits into
TeamNewPipe:devfrom
mstudio005:feat/block-channels-refactor

Conversation

@mstudio005

Copy link
Copy Markdown

What is it?

  • Bugfix (user facing)
  • Feature (user facing) ⚠️ Your PR must target the refactor branch
  • Codebase improvement (dev facing)
  • Meta improvement to the project (dev facing)

Description of the changes in your PR

  • Added a Room database table to store blocked channels with their name and URL
  • Added a Blocked Channels screen under Settings → Content
  • Added a "Block channel" option in the video long-press menu with an undo snackbar
  • Filtered blocked channels from search results, trending, and related videos
  • Fixed a crash on the Blocked Channels settings screen
  • Fixed a bug where filtering tried to modify immutable lists

Before/After Screenshots/Screen Record

  • Before:
  • After:
WhatsApp Image 2026-05-11 at 11 24 13 WhatsApp Image 2026-05-11 at 11 24 13 (1) WhatsApp Image 2026-05-11 at 11 24 13 (2)

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 on "CI", scroll down to "artifacts" and click "app" to
download the zip file which contains the debug APK of this PR.

Due diligence

  • I read the contribution guidelines
  • The proposed changes follow the AI policy ← I used codex pro for some issue.
  • I tested the changes using a physical device (Samsung Galaxy Tab A9+ 5G, Android 16)

Stypox and others added 30 commits November 21, 2024 10:56
…ate_empty_state_view

Migrate empty_state_view xml/view to Jetpack Compose
# Conflicts:
#	app/src/main/java/org/schabi/newpipe/ui/components/common/NoItemsMessage.kt
#	app/src/main/java/org/schabi/newpipe/ui/components/video/comment/CommentRepliesDialog.kt
Sort dependencies in `libs.versions.toml`
…pose

Migrate about activity to Jetpack Compose
Idadelveloper and others added 24 commits March 29, 2026 23:57
…_migration

Complete the debug screen migration to Compose
…tion

Replace the previous string-based resolution/fps/etc. handling for VideoStreams
by parsing the 'getResolution()'-string to a data class to improve maintainability.

Video resolutions (e.g. "720p60") were previously compared and matched using
regex-based string manipulation all over the place. This was fragile,
required repeated parsing and made it difficult to extend the matching logic.

It can handle all the strings like before: "720p", "720p60"

Additionally this patch can also handle strings like: "720p60@123k", or "720p@2m"

Main changes:
- Introduce internal data class VideoQuality (resolution, fps, bitrate, formatRank).
- Introduce internal VideoStreamWithQuality to associate streams with parsed quality.
- Parse quality only once.
- Replace resolution string sorting with a comparator based on
  resolution -> fps -> formatRank -> bitrate.
- Rework stream selection to use a priority-based matching algorithm
  (format, resolution, fps, bitrate).
- Prefer candidates with bitrate closest to the requested one when multiple
  streams match the same priority class.
…ality-representation-and-stream-selection_refactor

Rework video quality representation and stream selection refactor
Added unit tests for ListHelper
…s-crash

Fix crash when loading offline comments in CommentRepliesSource
… task

Signed-off-by: Aayush Gupta <aayushgupta219@gmail.com>
The about libraries gradle plugin does merge of duplicate by defaults.

Signed-off-by: Aayush Gupta <aayushgupta219@gmail.com>
Checkstyle was already requiring JDK 21 and now about libraries need it too

Use the kotlin extension method as it will also configure it for java code

Ref: https://kotlinlang.org/docs/gradle-configure-project.html#gradle-java-toolchains-support

Signed-off-by: Aayush Gupta <aayushgupta219@gmail.com>
* add error screen compasable

* add error activity

* create separate privacy policy dialog

* move base activity

* refactor error activity and tiny tweaks

* add new compose activity and navdisplay

* refactor app to utilize new compose activity

* clean up arguments in the ErrorReportScreen

* get rid of redundant colors

* tackle review issues

* rename getErrorActivityIntent
fix app crash on loading comment section with no internet
@github-actions github-actions Bot added the size/giant PRs with more than 750 changed lines label May 11, 2026
This was a hand-written implementation of channel blocking from scratch, including Room storage, a settings screen, long-press block actions, undo support, and filtering across the app.

I also used a little Claude Code during the process for support while keeping the implementation itself written and verified by hand.
@mstudio005
mstudio005 force-pushed the feat/block-channels-refactor branch from f4891b5 to f35d5d7 Compare May 11, 2026 06:18
@mstudio005

mstudio005 commented May 11, 2026

Copy link
Copy Markdown
Author

Closing this because in this pr I accidentally targeted the wrong branch and included upstream history. I will open a fresh clean PR targeting refactor.

Edit: Opened #13492

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

Labels

size/giant PRs with more than 750 changed lines

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Blacklist videos, channels and keywords Block Channels