diff --git a/pom.xml b/pom.xml index 33bca14..f8bd250 100644 --- a/pom.xml +++ b/pom.xml @@ -96,7 +96,7 @@ net.mamoe mirai-core-jvm - 2.7.0 + 2.7.1 org.jetbrains.kotlinx diff --git a/src/main/java/com/yutou/nas/NasApplication.java b/src/main/java/com/yutou/nas/NasApplication.java index 2df8f55..56761f4 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.3"; + public static final String version="1.2.4"; 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/MusicToolsServiceImpl.java b/src/main/java/com/yutou/nas/Services/impl/MusicToolsServiceImpl.java index 5f11ff1..54f3b88 100644 --- a/src/main/java/com/yutou/nas/Services/impl/MusicToolsServiceImpl.java +++ b/src/main/java/com/yutou/nas/Services/impl/MusicToolsServiceImpl.java @@ -114,6 +114,9 @@ public class MusicToolsServiceImpl implements IMusicToolsService { MusicDataExample example = new MusicDataExample(); String replacement = "windows".equals(ConfigTools.load(ConfigTools.CONFIG, "os")) ? "\\\\" : "/"; String tmpPath = path; + if(StringUtils.isEmpty(path)){ + tmpPath=AppData.defaultMusicPath; + } if (isDir) { example.createCriteria().andFileLike(tmpPath.replace(File.separator, replacement) + "%"); main = musicDataDao.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 57d1457..8f71a2a 100644 --- a/src/main/java/com/yutou/nas/utils/BTDownloadManager.java +++ b/src/main/java/com/yutou/nas/utils/BTDownloadManager.java @@ -66,11 +66,11 @@ public class BTDownloadManager implements ApplicationContextAware { } } private String getDmhyUrl(BangumiItem item){ - String dmhyUrl = "http://share.dmhy.org/topics/rss/page/1/rss.xml?keyword=%s%s%s&order=date-desc"; + String dmhyUrl = "http://share.dmhy.org/topics/rss/page/1/rss.xml?keyword=%s%s&order=date-desc"; dmhyUrl = String.format(dmhyUrl, item.getTitlekey().replace(" ", "+"), - "-1".equals(item.getCategories()) ? "" : String.format("&sort_id=%s", item.getCategories()), - "-1".equals(item.getAuthor()) ? "" : String.format("&team_id=%s", item.getAuthor())); + "-1".equals(item.getCategories()) ? "" : String.format("&sort_id=%s", item.getCategories()) + ); return dmhyUrl; } private String getRSSUrl(BangumiItem item) {