扫描音乐前清空数据库,以防止重复
This commit is contained in:
parent
a21a875261
commit
7b533bb0df
@ -61,10 +61,11 @@ public class MusicToolsServiceImpl implements IMusicToolsService {
|
|||||||
new Thread(() -> {
|
new Thread(() -> {
|
||||||
long startTime = System.currentTimeMillis();
|
long startTime = System.currentTimeMillis();
|
||||||
QQBotManager.getInstance().sendMessage("开始扫描音乐夹");
|
QQBotManager.getInstance().sendMessage("开始扫描音乐夹");
|
||||||
|
musicDataDao.truncate();
|
||||||
isScan = true;
|
isScan = true;
|
||||||
scan(new File(musicPath));
|
scan(new File(musicPath));
|
||||||
isScan = false;
|
isScan = false;
|
||||||
com.yutou.nas.utils.Log.i("扫描完成");
|
Log.i("扫描完成");
|
||||||
QQBotManager.getInstance().sendMessage("音乐扫描完成,共" + getLength() + "首歌,耗时:"
|
QQBotManager.getInstance().sendMessage("音乐扫描完成,共" + getLength() + "首歌,耗时:"
|
||||||
+ (System.currentTimeMillis() - startTime));
|
+ (System.currentTimeMillis() - startTime));
|
||||||
}).start();
|
}).start();
|
||||||
|
Loading…
Reference in New Issue
Block a user