mirror of
https://github.com/LamGC/ContentGrabbingJi.git
synced 2025-07-03 05:47:26 +00:00
[Add] PixivURL 为RankingContentType增加isSupportedMode以检查指定的RankingMode是否支持;
[Update] 对CQProcess, PixivDownload, RankingUpdateTimer添加对RankingContentType.isSupportedMode的支持以消除无效请求带来的资源浪费;
This commit is contained in:
@ -293,6 +293,10 @@ public class PixivDownload {
|
||||
throw new IllegalArgumentException("range cannot be less than or equal to zero");
|
||||
}
|
||||
|
||||
if(!contentType.isSupportedMode(mode)) {
|
||||
throw new IllegalArgumentException("ContentType不支持指定的RankingMode: ContentType: " + contentType.name() + ", Mode: " + mode.name());
|
||||
}
|
||||
|
||||
int startPage = (int) Math.ceil(rankStart / 50F);
|
||||
int requestFrequency = (int) Math.ceil((rankStart + (range - 1)) / 50F);
|
||||
int surplusQuantity = range;
|
||||
|
Reference in New Issue
Block a user