|
|
@@ -175,15 +175,21 @@ public class SpeakerServiceImpl implements ISpeakerService {
|
|
|
|
|
|
@Override
|
|
|
public void textParseVoiceAppIps(String texts,List<PlayVo> playVoList,Integer playNum,Integer level) {
|
|
|
- if (playVoList.size() == 1) {
|
|
|
- commonTextUrlVoice(texts, playVoList,playNum,level);
|
|
|
- } else {
|
|
|
- String deviceIp =playVoList.get(0).getDeviceIp();
|
|
|
- PlayBatchVo playBatchVo=commonPatchTextUrlVoice(texts,playVoList,playNum,level);
|
|
|
- boolean isTrue = invokePost(JSONObject.toJSON(playBatchVo).toString(), deviceIp,1, playVoList.get(0).getPort());
|
|
|
- if (isTrue) {
|
|
|
- textParseVoiceAppIps(texts,playVoList,playNum,level);
|
|
|
- }
|
|
|
+// if (playVoList.size() == 1) {
|
|
|
+// commonTextUrlVoice(texts, playVoList,playNum,level);
|
|
|
+// } else {
|
|
|
+// String deviceIp =playVoList.get(0).getDeviceIp();
|
|
|
+// PlayBatchVo playBatchVo=commonPatchTextUrlVoice(texts,playVoList,playNum,level);
|
|
|
+// boolean isTrue = invokePost(JSONObject.toJSON(playBatchVo).toString(), deviceIp,1, playVoList.get(0).getPort());
|
|
|
+// if (isTrue) {
|
|
|
+// textParseVoiceAppIps(texts,playVoList,playNum,level);
|
|
|
+// }
|
|
|
+// }
|
|
|
+ String deviceIp =playVoList.get(0).getDeviceIp();
|
|
|
+ PlayBatchVo playBatchVo=commonPatchTextUrlVoice(texts,playVoList,playNum,level);
|
|
|
+ boolean isTrue = invokePost(JSONObject.toJSON(playBatchVo).toString(), deviceIp,1, playVoList.get(0).getPort());
|
|
|
+ if (isTrue) {
|
|
|
+ textParseVoiceAppIps(texts,playVoList,playNum,level);
|
|
|
}
|
|
|
}
|
|
|
|
|
|
@@ -200,7 +206,7 @@ public class SpeakerServiceImpl implements ISpeakerService {
|
|
|
JSONObject jsonObject = new JSONObject();
|
|
|
jsonObject.put("sn", sn);
|
|
|
jsonObject.put("type", "req");
|
|
|
- jsonObject.put("name", "songs_queue_clear");
|
|
|
+ jsonObject.put("name", "priority_task_stop");
|
|
|
String responseStr = okHttpRequest.doPostJson(remoteUrlIp, token, jsonObject.toString());
|
|
|
logger.info("responseStr:+++++++++++++++++++++++++++" + responseStr + "+++++++++++++++++++++++++");
|
|
|
return tokenRefresh(responseStr);
|
|
|
@@ -273,7 +279,6 @@ public class SpeakerServiceImpl implements ISpeakerService {
|
|
|
if (null != play.getParams()) {
|
|
|
play.getParams().setTid(UUID.randomUUID().toString());
|
|
|
play.getParams().setUrls(urlVoList);
|
|
|
- play.getParams().setLevel(level);
|
|
|
}
|
|
|
boolean isTrue = invokePost(JSONObject.toJSON(play).toString(),deviceIp, 0, play.getPort());
|
|
|
if (isTrue) {
|
|
|
@@ -297,13 +302,16 @@ public class SpeakerServiceImpl implements ISpeakerService {
|
|
|
if (null != playBatchVo.getParams()) {
|
|
|
playBatchVo.getParams().setTid(UUID.randomUUID().toString());
|
|
|
playBatchVo.getParams().setUrls(urlVoList);
|
|
|
- playBatchVo.getParams().setLevel(level);
|
|
|
+ playBatchVo.getParams().setUid(UUID.randomUUID().toString());
|
|
|
}
|
|
|
List<String> snsList = new ArrayList<>();
|
|
|
+ List<String> reqList = new ArrayList<>();
|
|
|
for (PlayVo playVo : playVoList) {
|
|
|
snsList.add(playVo.getSn());
|
|
|
+ reqList.add("req");
|
|
|
}
|
|
|
playBatchVo.setSns(snsList.toArray(new String[snsList.size()]));
|
|
|
+ playBatchVo.setType(reqList.toArray(new String[reqList.size()]));
|
|
|
return playBatchVo;
|
|
|
}
|
|
|
|