Giter VIP home page Giter VIP logo

multithreaddownloader's People

Contributors

aigestudio avatar lazy-ape avatar yjwfn avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

multithreaddownloader's Issues

下载的线程有概率出现卡住的现象

表现为下载的进度不动了,手动暂停时,由于走不到DLThread里面,不走DLTask的onStop方法,然后TASK_DLING中无法删除这个任务,出现死循环,无法手动暂停或开始任务,只能dlCancel删除下载任务。
不太清楚为什么会出现这种情况。

提2个BUG

cn.aigestudio.downloader.bizs.DLTask
162行
if (info.file.exists() && info.file.length() == info.totalBytes&& info.file.length()!=0) {
Log.e(TAG, "The file which we want to download was already here.");
info.listener.onFinish(info.file);//建议加上这句 文件存在 返回onfinish 不然已经下载过的无法知道
return;
}

cn.aigestudio.downloader.bizs.DLManager dlStart
文件下载成功删除了文件 再次打开程序 就会有个bug db有数据 文件却不存在了 不会重新下载

//建议删除数据库 重新开始下载
if(dlInfo!=null) {
File file = new File(dlInfo.dirPath + dlInfo.fileName);
if (!file.exists() || file.length() == 0) {//不存在或者长度==0
DLDBManager.getInstance(context).deleteTaskInfo(url);
}
}

取消下载时bug

取消下载public void dlCancel(String url,String dirPath) 中:
List infos = sDBManager.queryThreadInfos(url);
if (null != infos && infos.size() != 0) {
sDBManager.deleteThreadInfos(url);
}
删除所有当前url所有线程信息,直接调用sDBManager.deleteThreadInfos(url);就可以;
deleteThreadInfos(url)实现也不对,应该是daoThread.deleteInfos(url);而不是daoThread.deleteInfo(url);

Number of connection

where i can find number of connection and thread? I want encrypt data before saving on storage. where i have to edit? and I prefer Only one connection because of my encryption.

下载内容过高导致Simple Listener失效?

你好,我使用AWS S3的下载影片内容高达700MB,结果都跑到80%~9​​0%左右,之后就不会跑onProgress,但是我直接去看档案已经下载完成了,有方法解决吗?
我有试过100MB以内的没有问题。

Can't Download when http response code is 206

I debugged it , when http response code is 206,

in DLTask.java => in dlInit() => in case HTTP_PARTIAL:

, info.totalBytes becomes greater than zero but condition is "info.totalBytes <= 0" . When i changed this condition to "info.totalBytes > 0" i can download file successfully.

But if I don't change that , I can't download file .

java.lang.NullPointerException:

java.lang.NullPointerException: Attempt to invoke virtual method 'int java.lang.Object.hashCode()' on a null object reference
at java.util.concurrent.ConcurrentHashMap.get(ConcurrentHashMap.java:746)
at java.util.concurrent.ConcurrentHashMap.containsKey(ConcurrentHashMap.java:774)
at cn.aigestudio.downloader.bizs.DLManager.dlStop(DLManager.java:267)
at cn.aigestudio.downloader.bizs.DLManager.dlCancel(DLManager.java:286)
at com.seowhy.video.util.CacheUtils.deleteLessonCache(CacheUtils.java:299)
at com.seowhy.video.util.CacheUtils.deleteCourseCache(CacheUtils.java:397)
at com.seowhy.video.adapter.UserCacheApapter$CacheViewHolder.onBtnDeteleClick(UserCacheApapter.java:110)
at com.seowhy.video.adapter.UserCacheApapter$CacheViewHolder$$ViewBinder$2.doClick(UserCacheApapter$CacheViewHolder$$ViewBinder.java:34)
at ...

不知道是不是我的错?

getDLInfo() Get no data;获取不到数据

DLInfo dlInfo = DLManager.getInstance(DownloadActivity.this).getDLInfo(Constant.WZURL);

dlInfo.currentBytes no data,Always be 0
dlInfo.currentBytes 没有数据,一直都是0

dltask的onProgress性能问题

我不知道System.currentTimeMillis()性能怎么样.
但我觉得这里变成百分比回调给UI层比较好,这样UI最多刷新100次.
还有就是为什么新文件下载是单线程,续传的时候 又成了多线程?

这个库支持http1.1协议吗?

http1.1协议默认就是chunked模式的,使用Gzip压缩,这样就会导致获取不到content_length,导致不能创建文件或者代码中有直接return处理吗?

查询方法。

如何获取下载队列里面的所有任务,和任务信息
如何设置最大下载数量

Method request : isDownloading , isStoped

hi and thank for this awesome library.
can you add some extra method to DlManager

dlISDownloading(String Url) // that method must return true if download is in progress now and false if is not 
and dlIsStoped(String Url) //  that method must return true if download is stoped   and false if it not exist in db 

thank you in advance.

非WIFI 和 3G网络时不下载

看了一下代码,里面是有判断在WIFI 和 3G网络下才下载,
但我在开发android电视方面的应用,连接的是有线网络,
是否可以提供一个无论是什么网络,只要网络连接了,就可以下载的接口?
Thank you!

url含中文

url含中文不能自动处理?需要手动encode吗?

Downloading urls is out of range.

Hi,
"D/DLManager: Resume task from database.
W/DLManager: Downloading urls is out of range."
What is the meaning of these messages?

and one more thing, please.
Even though I deleted the files that i downloaded, the app refuses to download the files again.
" D/DLTask: The file which we want to download was already here. "

写的太棒了

这两天读了一下源码,写的太棒了。完全挑不出问题。

状态

如何获取下载任务的状态,比如 正在下载中 已暂停 等待中 连接中。

Download HTML files

Hello,
Thank you for the project.
Is it possible to download HTML files?

Thank you,

希望多添加几个方法

希望能获取下载队里 里面所有的下载任务,并且返回相应的状态和进度。也可以根据url下载链接查询正在下载的任务状态和进度。

divide by zero

Cant run the sample failure callback returns "divide by zero" error

无法重复下载

下载完成后,再次点击下载,一直显示 xxx is downloading...
进度条也不更新。

Please solve the bugs

First of all Thanks for this amazing library.

There are still many bugs so please solve them
Many times it doesn't download files and gives negative values in onProgress sometimes it downloads corrupt files.
And how can I set threads number. How many threads it uses by default to download files?
And also please translate the Readme file in English
Waiting for your reply...

Thanks :)

建议已经下载过了加个回调

if (info.file.exists() && info.file.length() == info.totalBytes) {
Log.d(TAG, "The file which we want to download was already here.");
return;
}
上边这个地方已经下载过了仅仅是Log提示,不能满足我现在的需求,我用这个库做版本更新,下载apk成功后没有安装退出了APP,再进来提示更新时又执行下载,这时只有onPrepare()回调执行了,完了就提示上边这个了,但是我希望能提示我已经下载好了可以直接安装,我觉得有两个方案:1. 这里直接回调onFinish(File file),这样是可行的但是逻辑不够合理; 2. 加个回调onAlreadyExists(File file) 或者 onDownloaded(FIle file)之类的。
上边这些只是我个人的想法,不知道合不合理,盼答复!

如果下载的过程中退出应用,该如何保证下次应用启动的时候还能断点续传?

在下载的 activity 的 onDestroy 中调用了 dlStop 方法;但是在应用重新启动之后,进行 dlStart 还是重新开始下载的,有没有办法能保证应用重启之后还能继续上次的进度下载?

log 日志有如下记录,但是下载进度还是从 0 开始计算的。

11-04 09:44:06.544    8176-8210/com.g17.game.sdzs D/DLManager﹕ http://xxxxxxxxx will be resume.

下载网盘文件 java.io.IOException: open failed: ENAMETOOLONG (File name too long)

下载Apk解析失败问题

我在做版本更新,默认下载位置是/data/data/包名/cache,下载成功后跳转到安装时提示解析失败,我上网搜了应该是权限问题,用了网上的几个方案都没解决,官方建议是写入ContentProvider中,但是好麻烦,这个能不能改了?

部分服务器下载时提示证书找不到

发现下载某些服务器上的文件时,出现
D/DLManager﹕ javax.net.ssl.SSLHandshakeException: java.security.cert.CertPathValidatorException: Trust anchor for certification path not found.

建议下载时忽略所有证书

how to download m3u8 file

After parse m3u8 file, it's a playlist. When I download this playlist , how to associate to the m3u8 file.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.