TeamNewPipe/NewPipe

History OFF dumps tons of cache images/data to getExternalCacheDir()

Open

#10,442 opened on Sep 22, 2023

View on GitHub
 (8 comments) (0 reactions) (0 assignees)Java (3,577 forks)batch import
feature requestgood first issuehistoryprivacy & data protection

Repository metrics

Stars
 (38,153 stars)
PR merge metrics
 (Avg merge 9d 17h) (17 merged PRs in 30d)

Description

Checklist

  • I made sure that there are no existing issues - open or closed - which I could contribute my information to.
  • I have read the FAQ and my problem isn't listed.
  • I'm aware that this is a request for NewPipe itself and that requests for adding a new service need to be made at NewPipeExtractor.
  • I have taken the time to fill in all the required details. I understand that the feature request will be dismissed otherwise.
  • This issue contains only one feature request.
  • I have read and understood the contribution guidelines.

Feature description

At the moment even with history OFF, tons of thumbnails/other video-data is dumped to getExternalCacheDir(). This is usually STORAGE/Android/data/org.schabi.newpipe. See This is accessible easily on an unlocked phone.

One possibility is to replace this

--- a/app/src/main/java/org/schabi/newpipe/player/helper/PlayerDataSource.java
+++ b/app/src/main/java/org/schabi/newpipe/player/helper/PlayerDataSource.java
@@ -200,7 +200,7 @@ public class PlayerDataSource {

     private static void instantiateCacheIfNeeded(final Context context) {
         if (cache == null) {
-            final File cacheDir = new File(context.getExternalCacheDir(), CACHE_FOLDER_NAME);
+            final File cacheDir = new File(context.getCacheDir(), CACHE_FOLDER_NAME);
             if (DEBUG) {
                 Log.d(TAG, "instantiateCacheIfNeeded: cacheDir = " + cacheDir.getAbsolutePath());
             }

This would mean instead of using /data/ - this is not easily accessible.

Why do you want this feature?

Privacy for viewer

Additional information

My idea would be

  • In the hamburger menu (left side) there is an incognito mode (in addition to Trending, subscriptions, WhatsNewm Bookmarks, Downloads
  • Once the user click on that incognito
  • One gets may be a clean view (and all those others disappear)
  • Now, anything search/view/play - is totally not cached/temp
  • Exit incognito. May be then it uses ExternalCacheStorage

Contributor guide