diff --git a/app/src/main/java/com/github/catvod/utils/DownloadMT.kt b/app/src/main/java/com/github/catvod/utils/DownloadMT.kt index 2aa9badd..b6ff9193 100644 --- a/app/src/main/java/com/github/catvod/utils/DownloadMT.kt +++ b/app/src/main/java/com/github/catvod/utils/DownloadMT.kt @@ -43,6 +43,7 @@ object DownloadMT { } val code = info?.get(0) as Int + SpiderDebug.log("-----------code:" + code) if (code != 206) { return proxy(url, headers) } @@ -114,12 +115,8 @@ object DownloadMT { launch { for (bytes in channels[index]) { // 处理读取的数据 - outputStream.write(bytes); - } - - } } // 等待所有下载完成 @@ -151,6 +148,7 @@ object DownloadMT { // SpiderDebug.log("++proxy res body:" + response.body()); SpiderDebug.log("----proxy res respHeaders:" + Json.toJson(resHeader)) val pipedInputStream = ByteArrayInputStream(outputStream.toByteArray()); + outputStream.close() return arrayOf(206, contentType, pipedInputStream, resHeader) } catch (e: Exception) { diff --git a/jar/custom_spider.jar b/jar/custom_spider.jar index e05938f9..f92ac240 100644 Binary files a/jar/custom_spider.jar and b/jar/custom_spider.jar differ diff --git a/jar/custom_spider.jar.md5 b/jar/custom_spider.jar.md5 index 4675cdc5..8b554a7d 100644 --- a/jar/custom_spider.jar.md5 +++ b/jar/custom_spider.jar.md5 @@ -1 +1 @@ -59ca6e1cbed916f663fb3d0db2114517 +3ae6f55c9957262dfad22101c095d543 diff --git a/json/test.json b/json/test.json index ab030057..8ced3392 100644 --- a/json/test.json +++ b/json/test.json @@ -1,5 +1,5 @@ { - "spider": "https://ghproxy.net/https://raw.githubusercontent.com/lushunming/AndroidCatVodSpider/multiThreadkt/jar/custom_spider.jar;md5;59ca6e1cbed916f663fb3d0db2114517", + "spider": "https://ghproxy.net/https://raw.githubusercontent.com/lushunming/AndroidCatVodSpider/multiThreadkt/jar/custom_spider.jar;md5;3ae6f55c9957262dfad22101c095d543", "lives": [ { "name": "电视直播",