多线程优化,太大的视频缓存10M,小视频2M

This commit is contained in:
lushunming 2025-07-08 14:13:27 +08:00
parent 3662843f46
commit 27c57401e9
4 changed files with 4 additions and 4 deletions

View File

@ -206,8 +206,8 @@ public class ProxyVideo {
private static List<long[]> generatePart(Map<String, String> rangeObj, String total) {
long totalSize = Long.parseLong(total);
//超过10GB分块是30Mb不然是4MB
long partSize = totalSize > 8L * 1024L * 1024L * 1024L * 10L ? 1024 * 1024 * 8 * 30L : 1024 * 1024 * 8 * 4L;
//超过10GB分块是10Mb不然是2MB
long partSize = totalSize > 8L * 1024L * 1024L * 1024L * 10L ? 1024 * 1024 * 8 * 10L : 1024 * 1024 * 8 * 2L;
long start = Long.parseLong(rangeObj.get("start"));
long end = StringUtils.isAllBlank(rangeObj.get("end")) ? start + partSize : Long.parseLong(rangeObj.get("end"));

Binary file not shown.

View File

@ -1 +1 @@
eab498637837fc40d738fee62168b41a
1e79368bea06172cd75d6e5856d2618f

View File

@ -1,5 +1,5 @@
{
"spider": "https://andoridspidermt.netlify.app/jar/custom_spider.jar;md5;eab498637837fc40d738fee62168b41a",
"spider": "https://andoridspidermt.netlify.app/jar/custom_spider.jar;md5;1e79368bea06172cd75d6e5856d2618f",
"lives": [
{
"name": "电视直播",