TeamNewPipe/NewPipe

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

Open

#10,442 建立於 2023年9月22日

在 GitHub 查看
 (8 留言) (0 反應) (0 負責人)Java (3,577 fork)batch import
feature requestgood first issuehistoryprivacy & data protection

倉庫指標

Star
 (38,153 star)
PR 合併指標
 (平均合併 9天 17小時) (30 天內合併 17 個 PR)

描述

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

貢獻者指南