Skip to content
This repository has been archived by the owner on Apr 18, 2021. It is now read-only.

Commit

Permalink
bugfix
Browse files Browse the repository at this point in the history
  • Loading branch information
ShrBox committed Jan 11, 2021
1 parent 626c3ec commit 564b3bd
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
1 change: 0 additions & 1 deletion src/main/java/shrbox/github/acgpro/Main.java
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ class Main extends PluginBase {
public static short threadRunning = 0;

short maxPullCount = 10;
public boolean limitMode = false;
public static boolean flashImageMode = false;
public static int autoRecall = 0;
short maxThread = 10;
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/shrbox/github/acgpro/Thread.java
Original file line number Diff line number Diff line change
Expand Up @@ -78,12 +78,12 @@ public void run() {
new Timer().schedule(timerTask, 80 * 1000);
*/
if (pigNum == 1) { //单张图片处理
Main.threadRunning++;
Random random = new Random();
short index = (short) random.nextInt(json.data.size());
Data data = json.data.get(index);
e.getGroup().sendMessage("[ACGPro] 正在从服务器下载图片...");
Image image = null;
Main.threadRunning++;
String imageURL = data.url.replace("i.pixiv.cat", "pixivi.sakuralo.top");
String imageURL_ss = imageURL;
if (!Main.originalImages) {
Expand Down Expand Up @@ -122,12 +122,12 @@ public void run() {
}, Main.autoRecall * 1000);
}
} else { //多张图片处理
Main.threadRunning++;
if (pigNum > json.data.size()) pigNum = (short) json.data.size();
e.getGroup().sendMessage("[ACGPro] 正在从服务器下载" + pigNum + "张图片...");
for (short a = 0; a < pigNum; a++) {
Data data = json.data.get(a);
Image image = null;
Main.threadRunning++;
String imageURL = data.url.replace("i.pixiv.cat", "pixivi.sakuralo.top");
String imageURL_ss = imageURL;
if (!Main.originalImages) {
Expand Down

0 comments on commit 564b3bd

Please sign in to comment.