fix修复BT添加后未刷新库的问题

fix修复bt通知的名称
fix修复bt通知时没有图片
This commit is contained in:
Yutousama 2022-10-15 12:09:20 +08:00
parent 7ccb852223
commit 56e55bab44
2 changed files with 4 additions and 4 deletions

View File

@ -12,7 +12,7 @@ import org.springframework.context.annotation.Import;
@Import(DmhyRssDownloadManager.class) @Import(DmhyRssDownloadManager.class)
@SpringBootApplication @SpringBootApplication
public class NasApplication { public class NasApplication {
public static final String version = "1.2.17.2"; public static final String version = "1.2.17.3";
public static void main(String[] args) { public static void main(String[] args) {
SpringApplication.run(NasApplication.class, args); SpringApplication.run(NasApplication.class, args);

View File

@ -117,13 +117,13 @@ public class BTDownloadManager {
} }
public synchronized static void done(String path, String filename, String hash1, String hash2, String tid) { public synchronized static void done(String path, String filename, String hash1, String hash2, String tid) {
//grep(path,filename); grep(path,filename);
String hash = StringUtils.isEmpty(hash1) ? StringUtils.isEmpty(hash2) ? null : hash2 : hash1; String hash = StringUtils.isEmpty(hash1) ? StringUtils.isEmpty(hash2) ? null : hash2 : hash1;
if (hash != null) { if (hash != null) {
String map = RedisTools.getHashMap("rss", hash); String map = RedisTools.getHashMap("rss", hash);
JSONObject item = JSON.parseObject(map); JSONObject item = JSON.parseObject(map);
String text="添加到库:"+item.getString("title")+"\n大妈之家地址:"+item.getString("link"); String text="添加到库:"+item.getString("title")+"\n动漫花园地址:"+item.getString("link");
if (item.containsKey("thumbnail")) { if (!item.containsKey("thumbnail")) {
QQBotManager.getInstance().sendMessage(734332887,text); QQBotManager.getInstance().sendMessage(734332887,text);
} else { } else {
QQBotManager.getInstance().sendMessage(734332887,item.getString("thumbnail"),text); QQBotManager.getInstance().sendMessage(734332887,item.getString("thumbnail"),text);