修复音乐无法访问文件夹内的文件

更新QQbot版本
This commit is contained in:
2021-07-04 01:43:40 +08:00
parent 326bcfbf9e
commit 4b91b65d43
3 changed files with 10 additions and 8 deletions

View File

@@ -46,13 +46,13 @@ public class MusicController {
public String getMusicListOfPath(@RequestBody JSONObject body) {
String path = body.getString("path");
boolean type = body.containsKey("type") ? body.getBoolean("type") : false;
com.yutou.nas.utils.Log.i("接收到地址:" + path);
if (StringUtils.isEmpty(path)
|| path.equals("root")
|| "root".equals(path)
|| !path.contains(defaultMusicPath)
) {
path = defaultMusicPath;
}
com.yutou.nas.utils.Log.i("接收到地址:" + path);
//path=path.replace(defaultMusicPath+File.separator,"");
JSONObject json = new JSONObject();