Skip to content

Commit 2b90c97

Browse files
committed
修复问题
1 parent 6e13e8c commit 2b90c97

5 files changed

Lines changed: 22 additions & 16 deletions

File tree

CHANGELOG.MD

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@
22

33
更新日志文档,版本顺序从新到旧,最新版本在最前(上)面。
44

5+
# 1.0.6
6+
7+
- 修复问题
8+
59
# 1.0.5
610

711
- 修复问题

gradle.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
group=run.ikaros.plugin
22
description=A pan115 plugin for ikaros.
3-
version=1.0.5
3+
version=1.0.6

src/main/java/run/ikaros/plugin/pan115/Pan115AttachmentDriverFetcher.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@
2828

2929
@Slf4j
3030
@Extension
31-
@Component
3231
public class Pan115AttachmentDriverFetcher implements AttachmentDriverFetcher {
3332

3433
private final Pan115Repository pan115Repository;
@@ -66,7 +65,7 @@ private Mono<AttachmentDriver> checkoutToken(Long driverId) {
6665
return driverOperate.findById(driverId)
6766
.flatMap(driver -> {
6867
if (driver.getExpireTime() == null
69-
|| driver.getExpireTime().plusMinutes(35).isBefore(LocalDateTime.now())) {
68+
|| driver.getExpireTime().isBefore(LocalDateTime.now())) {
7069
applyPan115Token(driver);
7170
}
7271

src/main/java/run/ikaros/plugin/pan115/repository/DefaultPan115Repository.java

Lines changed: 15 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -85,20 +85,23 @@ public List<Pan115Attachment> openUFileFiles(String cid, Integer limit, Integer
8585
JsonUtils.json2ObjArr(JsonUtils.obj2Json(data), new TypeReference<>() {
8686
});
8787
Object pathObj = map.remove("path");
88-
Pan115Path[] parentPath = JsonUtils.json2ObjArr(JsonUtils.obj2Json(pathObj), new TypeReference<>() {
89-
});
90-
for (Pan115Attachment pan115Attachment : pan115Attachments) {
91-
List<Pan115Path> newPaths = new ArrayList<>();
92-
Pan115Path lastPath = new Pan115Path();
93-
lastPath.setFile_id(Long.parseLong(pan115Attachment.getFid()));
94-
lastPath.setFile_name(pan115Attachment.getFn());
95-
lastPath.setIss(String.valueOf(pan115Attachment.getIss()));
96-
for (Pan115Path pan115Path : parentPath) {
97-
newPaths.add(pan115Path);
88+
if (pathObj != null) {
89+
Pan115Path[] parentPath = JsonUtils.json2ObjArr(JsonUtils.obj2Json(pathObj), new TypeReference<>() {
90+
});
91+
for (Pan115Attachment pan115Attachment : pan115Attachments) {
92+
List<Pan115Path> newPaths = new ArrayList<>();
93+
Pan115Path lastPath = new Pan115Path();
94+
lastPath.setFile_id(Long.parseLong(pan115Attachment.getFid()));
95+
lastPath.setFile_name(pan115Attachment.getFn());
96+
lastPath.setIss(String.valueOf(pan115Attachment.getIss()));
97+
for (Pan115Path pan115Path : parentPath) {
98+
newPaths.add(pan115Path);
99+
}
100+
newPaths.add(lastPath);
101+
pan115Attachment.setPath(newPaths);
98102
}
99-
newPaths.add(lastPath);
100-
pan115Attachment.setPath(newPaths);
101103
}
104+
102105
if (pan115Attachments == null) {
103106
return List.of();
104107
}

src/main/resources/plugin.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ name: PluginPan115
44
# plugin entry class that extends BasePlugin
55
clazz: run.ikaros.plugin.pan115.Pan115Plugin
66
# plugin 'version' is a valid semantic version string (see semver.org).
7-
version: 1.0.0
7+
version: 1.0.6
88
requires: ">=1.0.4"
99
author:
1010
name: Ikaros OSS Team

0 commit comments

Comments
 (0)