修复音乐文件获取为空的问题
This commit is contained in:
parent
8ef33f382e
commit
006fb8c836
2
pom.xml
2
pom.xml
@ -96,7 +96,7 @@
|
||||
<dependency>
|
||||
<groupId>net.mamoe</groupId>
|
||||
<artifactId>mirai-core-jvm</artifactId>
|
||||
<version>2.7.0</version>
|
||||
<version>2.7.1</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.jetbrains.kotlinx</groupId>
|
||||
|
@ -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");
|
||||
|
@ -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);
|
||||
|
@ -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) {
|
||||
|
Loading…
Reference in New Issue
Block a user