Skip to content

Add clear-cache app shortcut and player keyboard shortcuts - #13930

Closed
awaisdev5765 wants to merge 2 commits into
TeamNewPipe:devfrom
awaisdev5765:feat/app-shortcuts-player-keys
Closed

awaisdev5765 wants to merge 2 commits into
TeamNewPipe:devfrom
awaisdev5765:feat/app-shortcuts-player-keys

Conversation

@awaisdev5765

@awaisdev5765 awaisdev5765 commented Oct 18, 2026 •

Copy link
Copy Markdown

Implements #8981 (long-press "Clear cache" action on the app icon) and partially implements #10448 (keyboard shortcuts in the player).

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 PR

  • Clear-cache app shortcut (Clear Cache option on app's icon long-press. #8981): new invisible ClearCacheActivity that wipes the metadata cache (InfoCache) and Coil's image memory + disk caches, shows a toast, and returns to the previous screen without opening the app. Registered via res/xml/shortcuts.xml, so it appears when long-pressing the app icon. The shortcut intent resolves through the activity's intent-filter instead of a hardcoded targetPackage, because debug builds use an applicationIdSuffix.
  • Player keyboard shortcuts (Keyboard shortcuts #10448, partial): in VideoPlayerUi.onKeyDown() — Space / media play-pause → play/pause, J / L → seek backward / forward, M / volume-mute → toggle mute. Applies to both mini and fullscreen players; the existing fullscreen Space behavior in MainPlayerUi is unchanged.

Before/After Screenshots/Screen Record

  • Before: no cache-clearing option on the app icon; no J/L/M key support in the player.
  • After: long-pressing the app icon shows "Clear cache"; J/L/M and Space now control playback/seek/mute when the player is active.

Fixes the following issue(s)

Note: #10448 is only partially implemented (play-pause, seek, mute); full shortcut support including arrow-key seek would need more discussion with maintainers.

Relies on the following changes

  • None

Testing/QA

Devices
  • Not yet tested on device/emulator — ran the changes against the dev branch source only.
Steps for testing
  1. Long-press the NewPipe app icon → tap "Clear cache" → metadata + image caches are wiped and a "Cache cleared" toast appears, without the app opening.
  2. Play any video, then press Space (toggles play/pause), J / L (seek backward/forward), M (mute/unmute).
APK for 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. You can find more info and a video demonstration on this wiki page.

Due diligence

Implements TeamNewPipe#8981 (long-press Clear cache action on the app icon) and
partially implements TeamNewPipe#10448 (keyboard shortcuts: space/media keys for
play-pause, J/L for seek, M for mute) as a gift to the project.
@github-actions github-actions Bot added size/medium PRs with less than 250 changed lines template-ignored labels Oct 18, 2026
@github-actions

Copy link
Copy Markdown
Contributor

Please link this PR to an existing issue you are assigned to. Assignees are expected to discuss the details of the PR beforehand. This PR will be closed if it is not linked to an issue.

@awaisdev5765

Copy link
Copy Markdown
Author

This PR fixes #8981 and partially implements #10448 — linking the issues as requested by the bot

Hardware keyboard users reported that arrow keys initiate focus
jumps between player UI elements instead of seeking. On non-TV
devices, LEFT/RIGHT now seek and D-pad-center toggles playback.
TV D-pad navigation behavior is unchanged.
@sonarqubecloud

Copy link
Copy Markdown

@awaisdev5765

Copy link
Copy Markdown
Author

This PR fixes #8981 and implements the core of #10448 (play/pause, seek via J/L and arrow keys on non-TV devices, mute) — linking issues as requested

@theimpulson theimpulson added the spam This change violates contribution guidelines of NewPipe. label Oct 21, 2026
@theimpulson

Copy link
Copy Markdown
Member

Closing this due to no violating contribution guidelines.

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

Labels

size/medium PRs with less than 250 changed lines spam This change violates contribution guidelines of NewPipe. template-ignored

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Clear Cache option on app's icon long-press.

3 participants