Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

下载功能-从“本地恢复”的问题 #1198

Closed
junwense opened this issue May 11, 2024 · 2 comments
Closed

下载功能-从“本地恢复”的问题 #1198

junwense opened this issue May 11, 2024 · 2 comments

Comments

@junwense
Copy link

今天没事点了测了下恢复,后续看了下源码,感觉是按25条分批处理提交api(EhEngine.java .fillGalleryListByApi)去查询,但是这里如果有一笔错了就会中断导致停止,而且我看获取文件的时候一次性获取所有的uri是不是可能会oom,因为我测试的时候本地2w多文件夹(主要是对这个项目不太了解,只能勉勉强强看懂,不然可以尝试改下)

报错的日志如下,

5-11 02:53:27.153 25718 25841 W System.err: org.json.JSONException: No value for title 05-11 02:53:27.159 25718 25841 W System.err: at org.json.JSONObject.get(JSONObject.java:398) 05-11 02:53:27.159 25718 25841 W System.err: at org.json.JSONObject.getString(JSONObject.java:559) 05-11 02:53:27.160 25718 25841 W System.err: at com.hippo.ehviewer.client.parser.GalleryApiParser.parse(GalleryApiParser.java:42) 05-11 02:53:27.160 25718 25841 W System.err: at com.hippo.ehviewer.client.EhEngine.doFillGalleryListByApi(EhEngine.java:342) 05-11 02:53:27.160 25718 25841 W System.err: at com.hippo.ehviewer.client.EhEngine.fillGalleryListByApi(EhEngine.java:299) 05-11 02:53:27.160 25718 25841 W System.err: at com.hippo.ehviewer.preference.RestoreDownloadPreference$RestoreTask.doInBackground(RestoreDownloadPreference.java:138) 05-11 02:53:27.160 25718 25841 W System.err: at com.hippo.ehviewer.preference.RestoreDownloadPreference$RestoreTask.doInBackground(RestoreDownloadPreference.java:66) 05-11 02:53:27.160 25718 25841 W System.err: at android.os.AsyncTask$3.call(AsyncTask.java:394) 05-11 02:53:27.160 25718 25841 W System.err: at java.util.concurrent.FutureTask.run(FutureTask.java:264) 05-11 02:53:27.160 25718 25841 W System.err: at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) 05-11 02:53:27.160 25718 25841 W System.err: at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:644) 05-11 02:53:27.160 25718 25841 W System.err: at java.lang.Thread.run(Thread.java:1012) 05-11 02:53:27.160 25718 25841 W System.err: at com.hippo.yorozuya.thread.PriorityThread.run(PriorityThread.java:38) 05-11 02:53:27.160 25718 25841 W System.err: org.json.JSONException: No value for title 05-11 02:53:27.160 25718 25841 W System.err: at org.json.JSONObject.get(JSONObject.java:398) 05-11 02:53:27.160 25718 25841 W System.err: at org.json.JSONObject.getString(JSONObject.java:559) 05-11 02:53:27.160 25718 25841 W System.err: at com.hippo.ehviewer.client.parser.GalleryApiParser.parse(GalleryApiParser.java:42) 05-11 02:53:27.160 25718 25841 W System.err: at com.hippo.ehviewer.client.EhEngine.doFillGalleryListByApi(EhEngine.java:342) 05-11 02:53:27.160 25718 25841 W System.err: at com.hippo.ehviewer.client.EhEngine.fillGalleryListByApi(EhEngine.java:299) 05-11 02:53:27.160 25718 25841 W System.err: at com.hippo.ehviewer.preference.RestoreDownloadPreference$RestoreTask.doInBackground(RestoreDownloadPreference.java:138) 05-11 02:53:27.160 25718 25841 W System.err: at com.hippo.ehviewer.preference.RestoreDownloadPreference$RestoreTask.doInBackground(RestoreDownloadPreference.java:66) 05-11 02:53:27.160 25718 25841 W System.err: at android.os.AsyncTask$3.call(AsyncTask.java:394) 05-11 02:53:27.161 25718 25841 W System.err: at java.util.concurrent.FutureTask.run(FutureTask.java:264) 05-11 02:53:27.161 25718 25841 W System.err: at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) 05-11 02:53:27.161 25718 25841 W System.err: at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:644) 05-11 02:53:27.161 25718 25841 W System.err: at java.lang.Thread.run(Thread.java:1012) 05-11 02:53:27.161 25718 25841 W System.err: at com.hippo.yorozuya.thread.PriorityThread.run(PriorityThread.java:38

@junwense
Copy link
Author

而且我检查了此方法最后调用的RestoreDownloadPreference.class.RestoreDownloadPreference,这个方法里面好像关于ehdb数据库的insert方法都被注释掉了,是展示不支持此类功能了么

@xiaojieonly
Copy link
Owner

你可以试着提交一个pull request

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants