From ed97daa08958873c3dc50c1e6965e03abe129997 Mon Sep 17 00:00:00 2001 From: Yutousama <583819556@qq.com> Date: Thu, 7 Apr 2022 16:23:28 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E4=B8=8B=E8=BD=BD=E6=89=AB?= =?UTF-8?q?=E6=8F=8F=E6=9C=AA=E8=BF=87=E6=BB=A4=E5=BC=80=E5=85=B3=E7=9A=84?= =?UTF-8?q?bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/java/com/yutou/nas/NasApplication.java | 2 +- .../java/com/yutou/nas/Services/impl/BangumiServiceImpl.java | 4 +++- src/main/java/com/yutou/nas/utils/BTDownloadManager.java | 5 +++++ 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/src/main/java/com/yutou/nas/NasApplication.java b/src/main/java/com/yutou/nas/NasApplication.java index 428b9c8..0547a32 100644 --- a/src/main/java/com/yutou/nas/NasApplication.java +++ b/src/main/java/com/yutou/nas/NasApplication.java @@ -12,7 +12,7 @@ import org.springframework.context.annotation.Import; @Import(BTDownloadManager.class) @SpringBootApplication public class NasApplication { - public static final String version="1.2.10.2"; + public static final String version="1.2.11"; public static void main(String[] args) { SpringApplication.run(NasApplication.class, args); AppData.defaultMusicPath = (String) ConfigTools.load(ConfigTools.CONFIG, "musicDir"); diff --git a/src/main/java/com/yutou/nas/Services/impl/BangumiServiceImpl.java b/src/main/java/com/yutou/nas/Services/impl/BangumiServiceImpl.java index 089a5ab..40b3a76 100644 --- a/src/main/java/com/yutou/nas/Services/impl/BangumiServiceImpl.java +++ b/src/main/java/com/yutou/nas/Services/impl/BangumiServiceImpl.java @@ -15,6 +15,8 @@ public class BangumiServiceImpl implements IBangumiService { BangumiItemDao itemDao; @Override public List getAllBangumi() { - return itemDao.selectByExample(new BangumiItemExample()); + BangumiItemExample example=new BangumiItemExample(); + example.createCriteria().andEnableEqualTo(1); + return itemDao.selectByExample(example); } } diff --git a/src/main/java/com/yutou/nas/utils/BTDownloadManager.java b/src/main/java/com/yutou/nas/utils/BTDownloadManager.java index 8f305c8..d8618b8 100644 --- a/src/main/java/com/yutou/nas/utils/BTDownloadManager.java +++ b/src/main/java/com/yutou/nas/utils/BTDownloadManager.java @@ -46,6 +46,9 @@ public class BTDownloadManager implements ApplicationContextAware { List list = bangumiService.getAllBangumi(); AnimationData data = new AnimationData(); Log.i("BT","启动BT检测,总数:"+list.size()); + for (BangumiItem item : list) { + System.out.println("item.getTitle() = " + item.getTitle()); + } File path=new File(DownloadHomePath); if(!path.exists()){ Log.i("BT","下载目录已离线,取消扫描"); @@ -127,6 +130,8 @@ public class BTDownloadManager implements ApplicationContextAware { } public boolean download(String title, String url) { + if(true) + return false; try { String exec = String.format("transmission-remote -n yutou:34864394 -w \"%sanim/%s\" -a \"%s\" " ,DownloadHomePath