mirror of
https://github.com/LamGC/ContentGrabbingJi.git
synced 2025-07-01 21:07:25 +00:00
[Add] 对ranking和search增加作品页数的显示;
This commit is contained in:
@ -174,10 +174,11 @@ public class CQProcess {
|
|||||||
int rank = rankInfo.get("rank").getAsInt();
|
int rank = rankInfo.get("rank").getAsInt();
|
||||||
int illustId = rankInfo.get("illust_id").getAsInt();
|
int illustId = rankInfo.get("illust_id").getAsInt();
|
||||||
int authorId = rankInfo.get("user_id").getAsInt();
|
int authorId = rankInfo.get("user_id").getAsInt();
|
||||||
|
int pagesCount = rankInfo.get("illust_page_count").getAsInt();
|
||||||
String authorName = rankInfo.get("user_name").getAsString();
|
String authorName = rankInfo.get("user_name").getAsString();
|
||||||
String title = rankInfo.get("title").getAsString();
|
String title = rankInfo.get("title").getAsString();
|
||||||
resultBuilder.append(rank).append(". (id: ").append(illustId).append(") ").append(title)
|
resultBuilder.append(rank).append(". (id: ").append(illustId).append(") ").append(title)
|
||||||
.append("(Author: ").append(authorName).append(",").append(authorId).append(")\n");
|
.append("(Author: ").append(authorName).append(",").append(authorId).append(") ").append(pagesCount).append("p.\n");
|
||||||
if (index <= imageLimit) {
|
if (index <= imageLimit) {
|
||||||
resultBuilder.append(getImageById(illustId, PixivDownload.PageQuality.REGULAR, 1)).append("\n");
|
resultBuilder.append(getImageById(illustId, PixivDownload.PageQuality.REGULAR, 1)).append("\n");
|
||||||
}
|
}
|
||||||
@ -328,7 +329,7 @@ public class CQProcess {
|
|||||||
StringBuilder builder = new StringBuilder("[");
|
StringBuilder builder = new StringBuilder("[");
|
||||||
illustObj.get("tags").getAsJsonArray().forEach(el -> builder.append(el.getAsString()).append(", "));
|
illustObj.get("tags").getAsJsonArray().forEach(el -> builder.append(el.getAsString()).append(", "));
|
||||||
builder.replace(builder.length() - 2, builder.length(), "]");
|
builder.replace(builder.length() - 2, builder.length(), "]");
|
||||||
log.debug("{} ({} / {})\n\t作品id: {}, \n\t作者名(作者id): {} ({}), \n\t作品标题: {}, \n\t作品Tags: {}, \n\t作品链接: {}",
|
log.debug("{} ({} / {})\n\t作品id: {}, \n\t作者名(作者id): {} ({}), \n\t作品标题: {}, \n\t作品Tags: {}, \n\t页数: {}, \n\t作品链接: {}",
|
||||||
searchArea.name(),
|
searchArea.name(),
|
||||||
count,
|
count,
|
||||||
illustsList.size(),
|
illustsList.size(),
|
||||||
@ -337,9 +338,12 @@ public class CQProcess {
|
|||||||
illustObj.get("userId").getAsInt(),
|
illustObj.get("userId").getAsInt(),
|
||||||
illustObj.get("illustTitle").getAsString(),
|
illustObj.get("illustTitle").getAsString(),
|
||||||
builder,
|
builder,
|
||||||
|
illustObj.get("pageCount").getAsInt(),
|
||||||
PixivURL.getPixivRefererLink(illustId)
|
PixivURL.getPixivRefererLink(illustId)
|
||||||
);
|
);
|
||||||
|
|
||||||
|
//pageCount
|
||||||
|
|
||||||
String imageMsg = getImageById(illustId, PixivDownload.PageQuality.REGULAR, 1);
|
String imageMsg = getImageById(illustId, PixivDownload.PageQuality.REGULAR, 1);
|
||||||
if (isNoSafe(illustId, CQPluginMain.globalProp, true)) {
|
if (isNoSafe(illustId, CQPluginMain.globalProp, true)) {
|
||||||
log.warn("作品Id {} 为R-18作品, 跳过.", illustId);
|
log.warn("作品Id {} 为R-18作品, 跳过.", illustId);
|
||||||
@ -348,7 +352,9 @@ public class CQProcess {
|
|||||||
|
|
||||||
result.append(searchArea.name()).append(" (").append(count).append(" / ").append(limit).append(")\n\t作品id: ").append(illustId)
|
result.append(searchArea.name()).append(" (").append(count).append(" / ").append(limit).append(")\n\t作品id: ").append(illustId)
|
||||||
.append(", \n\t作者名: ").append(illustObj.get("userName").getAsString())
|
.append(", \n\t作者名: ").append(illustObj.get("userName").getAsString())
|
||||||
.append("\n\t作品标题: ").append(illustObj.get("illustTitle").getAsString()).append("\n").append(imageMsg).append("\n");
|
.append("\n\t作品标题: ").append(illustObj.get("illustTitle").getAsString())
|
||||||
|
.append("\n\t作品页数: ").append(illustObj.get("pageCount").getAsInt())
|
||||||
|
.append("\n").append(imageMsg).append("\n");
|
||||||
count++;
|
count++;
|
||||||
}
|
}
|
||||||
if (count > limit) {
|
if (count > limit) {
|
||||||
|
Reference in New Issue
Block a user