fix新增过滤纯音乐

This commit is contained in:
Yutousama 2022-11-14 14:06:17 +08:00
parent face663b6e
commit e58cb29656

View File

@ -126,7 +126,7 @@ public class MusicToolsServiceImpl implements IMusicToolsService {
example.createCriteria().andFileLike(tmpPath.replace(File.separator, replacement) + "%"); example.createCriteria().andFileLike(tmpPath.replace(File.separator, replacement) + "%");
} }
main = musicDataDao.selectByExample(example, delPath); main = musicDataDao.selectByExample(example, delPath);
} }else {
tmpPath = tmpPath.replace(File.separator, replacement) tmpPath = tmpPath.replace(File.separator, replacement)
.replace("+", "\\+") .replace("+", "\\+")
.replace("[", "\\[") .replace("[", "\\[")
@ -134,6 +134,7 @@ public class MusicToolsServiceImpl implements IMusicToolsService {
.replace(")", "\\)") .replace(")", "\\)")
.replace("]", "\\]"); .replace("]", "\\]");
main.addAll(musicDataDao.selectByRegexp(tmpPath + replacement + "([^" + replacement + "]+)$", delPath)); main.addAll(musicDataDao.selectByRegexp(tmpPath + replacement + "([^" + replacement + "]+)$", delPath));
}
if (!path.equals(AppData.defaultMusicPath) && !"root".equals(path)) { if (!path.equals(AppData.defaultMusicPath) && !"root".equals(path)) {
MusicData t2 = new MusicData(); MusicData t2 = new MusicData();