|
@@ -44,7 +44,6 @@ public class MusicServiceImpl implements MusicService {
|
|
|
|
|
|
@Override
|
|
|
public void stop() {
|
|
|
-
|
|
|
synchronized (this) {
|
|
|
log.info("stop music");
|
|
|
endCmd = true;
|
|
@@ -74,13 +73,7 @@ public class MusicServiceImpl implements MusicService {
|
|
|
p = null;
|
|
|
}
|
|
|
}
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- @Scheduled(fixedRate = 500)
|
|
|
- public void repeat() {
|
|
|
- synchronized (this) {
|
|
|
- if (repeat && p == null && cmd != null) {
|
|
|
+ if (!startCmd && !endCmd && repeat && p == null && cmd != null) {
|
|
|
log.info("repeat:{}", cmd);
|
|
|
try {
|
|
|
p = Runtime.getRuntime().exec(cmd);
|