分片数优化
This commit is contained in:
parent
976a5b441f
commit
8a5d18dbb1
|
|
@ -157,9 +157,9 @@ object DownloadMT {
|
|||
val totalSize = total.toLong()
|
||||
//超过10GB,分块是80MB,不然是16MB
|
||||
val partSize =
|
||||
if (totalSize > 1024L * 1024L * 1024L * 10L) 1024 * 1024 * 8 * 10L else 1024 * 1024 * 8 * 2L
|
||||
THREAD_NUM=
|
||||
if (totalSize > 1024L * 1024L * 1024L * 10L) 64 else THREAD_NUM
|
||||
if (totalSize > 1024L * 1024L * 1024L * 10L) 1024 * 1024 * 8 * 10L else 1024 * 1024 * 8 * 2L
|
||||
THREAD_NUM = if (totalSize > 1024L * 1024L * 1024L * 10L) 64 else Runtime.getRuntime()
|
||||
.availableProcessors() * 2
|
||||
var start = rangeObj["start"]!!.toLong()
|
||||
var end =
|
||||
if (StringUtils.isAllBlank(rangeObj["end"])) start + partSize else rangeObj["end"]!!.toLong()
|
||||
|
|
|
|||
Binary file not shown.
|
|
@ -1 +1 @@
|
|||
1810f7f08ca50f55c2cffb49a2a1678d
|
||||
ca49e8939240a5851b24f58461c82ef9
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
{
|
||||
"spider": "https://andoridspidermt.netlify.app/jar/custom_spider.jar;md5;1810f7f08ca50f55c2cffb49a2a1678d",
|
||||
"spider": "https://andoridspidermt.netlify.app/jar/custom_spider.jar;md5;ca49e8939240a5851b24f58461c82ef9",
|
||||
"lives": [
|
||||
{
|
||||
"name": "电视直播",
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
{
|
||||
"spider": "https://ghproxy.net/https://raw.githubusercontent.com/lushunming/AndroidCatVodSpider/multiThreadkt/jar/custom_spider.jar;md5;1810f7f08ca50f55c2cffb49a2a1678d",
|
||||
"spider": "https://ghproxy.net/https://raw.githubusercontent.com/lushunming/AndroidCatVodSpider/multiThreadkt/jar/custom_spider.jar;md5;ca49e8939240a5851b24f58461c82ef9",
|
||||
"lives": [
|
||||
{
|
||||
"name": "电视直播",
|
||||
|
|
|
|||
Loading…
Reference in New Issue