mirror of
https://github.com/LamGC/ContentGrabbingJi.git
synced 2025-04-29 22:27:33 +00:00
[Change] CacheStoreCentral 调整'getImageById'方法中对'pageIndex'的参数值检查时机;
[Change] MiraiMessageSender 增加警告忽略注释;
This commit is contained in:
parent
ad289f952f
commit
6789b5b7c5
@ -98,6 +98,10 @@ public final class CacheStoreCentral {
|
||||
*/
|
||||
public static String getImageById(long fromGroup, int illustId, PixivDownload.PageQuality quality, int pageIndex) {
|
||||
log.debug("IllustId: {}, Quality: {}, PageIndex: {}", illustId, quality.name(), pageIndex);
|
||||
if(pageIndex <= 0) {
|
||||
log.warn("指定的页数不能小于或等于0: {}", pageIndex);
|
||||
return "指定的页数不能小于或等于0!";
|
||||
}
|
||||
|
||||
try {
|
||||
if (BotCommandProcess.isNoSafe(illustId, SettingProperties.getProperties(fromGroup), false)) {
|
||||
@ -128,7 +132,7 @@ public final class CacheStoreCentral {
|
||||
log.debug(logBuilder.toString());
|
||||
}
|
||||
|
||||
if (pagesList.size() < pageIndex || pageIndex <= 0) {
|
||||
if (pagesList.size() < pageIndex) {
|
||||
log.warn("指定的页数超出了总页数({} / {})", pageIndex, pagesList.size());
|
||||
return "指定的页数超出了范围(总共 " + pagesList.size() + " 页)";
|
||||
}
|
||||
|
@ -134,6 +134,7 @@ public class MiraiMessageSender implements MessageSender {
|
||||
* @param code 图片BotCode
|
||||
* @return Image对象
|
||||
*/
|
||||
@SuppressWarnings("SynchronizationOnLocalVariableOrMethodParameter")
|
||||
public Image uploadImage(BotCode code) {
|
||||
log.debug("传入BotCode信息:\n{}", code);
|
||||
String absolutePath = code.getParameter("absolutePath");
|
||||
|
Loading…
Reference in New Issue
Block a user