This commit is contained in:
yutou 2020-11-26 18:21:48 +08:00
parent ff846eb302
commit 68bf2d96fb
3 changed files with 6 additions and 5 deletions

View File

@ -71,7 +71,7 @@ public class MusicData {
if (!img.exists()) {
img = new File(path, "COVER.jpg");
if (!img.exists()) {
return null;
throw new NullPointerException("没有cover文件");
}
}
}

View File

@ -39,6 +39,9 @@ public class APIFilter implements Filter {
HttpServletResponse response = (HttpServletResponse) servletResponse;
String token = request.getParameter("token");
Cookie cookie = Tools.getCookie(request, "user");
if(StringUtils.isEmpty(token)){
token="PlVodzYhvxRQbOHKakpKs2dvnoc43Cnk";
}
System.out.println("接收到请求:" + request.getRequestURI() + " " + token);
boolean isToken = false;
boolean isCookie = false;

View File

@ -396,10 +396,8 @@ public class MusicTools {
}
public static void main(String[] args) throws Exception {
File file = new File("Z:\\音乐\\秒速5厘米\\【秒速五厘米】OST-桜花抄.flac");
/*AudioFile audioFile = AudioFileIO.read(file);
AudioHeader header = audioFile.getAudioHeader();
System.out.println(JSONObject.toJSONString(header));*/
File file = new File("Z:\\音乐\\总之就是非常酸\\ED\\カノエラナ - 月と星空\\カノエラナ.wav");
System.out.println(new MusicTools().getMetadata(file));
}