TeamNewPipe/NewPipe

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

Open

#10.442 geöffnet am 22. Sept. 2023

Auf GitHub ansehen
 (8 Kommentare) (0 Reaktionen) (0 zugewiesene Personen)Java (3.577 Forks)batch import
feature requestgood first issuehistoryprivacy & data protection

Repository-Metriken

Stars
 (38.153 Stars)
PR-Merge-Metriken
 (Durchschn. Merge 9T 17h) (17 gemergte PRs in 30 T)

Beschreibung

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