Clean code

This commit is contained in:
FongMi 2023-10-17 17:42:05 +08:00
parent d4b303b4e0
commit d5e70b3b2d
5 changed files with 5 additions and 4 deletions

View File

@ -18,6 +18,7 @@ import java.io.FileOutputStream;
import java.io.InputStream; import java.io.InputStream;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;
import java.util.Random;
import okhttp3.Response; import okhttp3.Response;
@ -78,7 +79,7 @@ public class Market extends Spider {
totalBytes += readBytes; totalBytes += readBytes;
os.write(buffer, 0, readBytes); os.write(buffer, 0, readBytes);
int progress = (int) (totalBytes / length * 100.0); int progress = (int) (totalBytes / length * 100.0);
if (progress % 10 < 5) Utils.notify("正在下載..." + progress + "%"); if (progress % 10 <= new Random().nextInt(6)) Utils.notify("正在下載..." + progress + "%");
} }
} }
} }

Binary file not shown.

View File

@ -1 +1 @@
e387f38428b7c337475b2827c56949f5 6d1c97eeff8c95ad0f456d066efde69b

View File

@ -1,5 +1,5 @@
{ {
"spider": "https://fongmi.cachefly.net/FongMi/CatVodSpider/main/jar/custom_spider.jar;md5;e387f38428b7c337475b2827c56949f5", "spider": "https://fongmi.cachefly.net/FongMi/CatVodSpider/main/jar/custom_spider.jar;md5;6d1c97eeff8c95ad0f456d066efde69b",
"wallpaper": "https://gao.chuqiuyu.tk", "wallpaper": "https://gao.chuqiuyu.tk",
"sites": [ "sites": [
{ {

View File

@ -1,5 +1,5 @@
{ {
"spider": "https://fongmi.cachefly.net/FongMi/CatVodSpider/main/jar/custom_spider.jar;md5;e387f38428b7c337475b2827c56949f5", "spider": "https://fongmi.cachefly.net/FongMi/CatVodSpider/main/jar/custom_spider.jar;md5;6d1c97eeff8c95ad0f456d066efde69b",
"wallpaper": "http://饭太硬.top/深色壁纸/api.php", "wallpaper": "http://饭太硬.top/深色壁纸/api.php",
"sites": [ "sites": [
{ {