Clean code
This commit is contained in:
parent
81cd336eac
commit
1c82143067
|
|
@ -479,11 +479,11 @@ public class AliYun {
|
||||||
}
|
}
|
||||||
|
|
||||||
if ("open".equals(cate)) {
|
if ("open".equals(cate)) {
|
||||||
|
thread = 10;
|
||||||
downloadUrl = getDownloadUrl(shareId, fileId);
|
downloadUrl = getDownloadUrl(shareId, fileId);
|
||||||
thread = 30;
|
|
||||||
} else if ("share".equals(cate)) {
|
} else if ("share".equals(cate)) {
|
||||||
|
thread = 10;
|
||||||
downloadUrl = getShareDownloadUrl(shareId, fileId);
|
downloadUrl = getShareDownloadUrl(shareId, fileId);
|
||||||
thread = 30;
|
|
||||||
} else if ("m3u8".equals(cate)) {
|
} else if ("m3u8".equals(cate)) {
|
||||||
lock.lock();
|
lock.lock();
|
||||||
String mediaUrl = m3u8MediaMap.get(fileId).get(mediaId);
|
String mediaUrl = m3u8MediaMap.get(fileId).get(mediaId);
|
||||||
|
|
|
||||||
|
|
@ -1,8 +1,5 @@
|
||||||
package com.github.catvod.utils;
|
package com.github.catvod.utils;
|
||||||
|
|
||||||
import com.github.catvod.spider.Proxy;
|
|
||||||
|
|
||||||
import java.net.URLEncoder;
|
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.TreeMap;
|
import java.util.TreeMap;
|
||||||
|
|
||||||
|
|
@ -10,10 +7,6 @@ import fi.iki.elonen.NanoHTTPD;
|
||||||
|
|
||||||
public class MultiThread {
|
public class MultiThread {
|
||||||
|
|
||||||
public static String url(String url, int thread) {
|
|
||||||
return String.format(Proxy.getUrl() + "?do=multi&url=%s&thread=%d", URLEncoder.encode(url), thread);
|
|
||||||
}
|
|
||||||
|
|
||||||
public static Object[] proxy(Map<String, String> params) throws Exception {
|
public static Object[] proxy(Map<String, String> params) throws Exception {
|
||||||
String url = params.get("url");
|
String url = params.get("url");
|
||||||
int thread = Integer.parseInt(params.get("thread"));
|
int thread = Integer.parseInt(params.get("thread"));
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue