Commit 1cce332442a00285416c550ca595c8e51957eae8
1 parent
42993a56
优化隐藏文件的判断
Showing
2 changed files
with
2 additions
and
3 deletions
src/main/java/top/panll/assist/service/VideoFileFactory.java
| ... | ... | @@ -22,10 +22,10 @@ public class VideoFileFactory { |
| 22 | 22 | if (!file.isFile()){ |
| 23 | 23 | return null; |
| 24 | 24 | } |
| 25 | - if (file.getName().startsWith(".")){ | |
| 25 | + if (!file.getName().endsWith(".mp4")){ | |
| 26 | 26 | return null; |
| 27 | 27 | } |
| 28 | - if (!file.getName().endsWith(".mp4")){ | |
| 28 | + if (file.isHidden()){ | |
| 29 | 29 | return null; |
| 30 | 30 | } |
| 31 | 31 | String date = file.getParentFile().getName(); | ... | ... |
src/main/java/top/panll/assist/service/VideoFileService.java
| ... | ... | @@ -260,7 +260,6 @@ public class VideoFileService { |
| 260 | 260 | || videoFile.getEndTime().equals(endTime) |
| 261 | 261 | || (videoFile.getEndTime().after(endTime) && videoFile.getStartTime().before(endTime)); |
| 262 | 262 | } |
| 263 | - | |
| 264 | 263 | } |
| 265 | 264 | }); |
| 266 | 265 | if (files != null && files.length > 0) { | ... | ... |