update
This commit is contained in:
parent
9b7633e8a9
commit
98d7ed7061
@ -477,6 +477,9 @@ public class Live implements ApplicationContextAware {
|
||||
upData.setLive(1);
|
||||
LiveUtils.LiveInfoManager.getInstance().check(roomId);
|
||||
JSONObject liveInfo = LiveUtils.LiveInfoManager.getInstance().getInfo(roomId);
|
||||
if(liveInfo==null){
|
||||
break;
|
||||
}
|
||||
StringBuilder builder = new StringBuilder();
|
||||
builder.append(upData.getName()).append("开播了!").append("\n");
|
||||
builder.append(liveInfo.getJSONObject("data").getJSONObject("room_info").getString("title"));
|
||||
@ -488,10 +491,7 @@ public class Live implements ApplicationContextAware {
|
||||
}
|
||||
});
|
||||
break;
|
||||
case "PREPARING":
|
||||
upData.setLive(0);
|
||||
QQBotManager.getInstance().sendMessage(upData.getName() + " 已下播");
|
||||
break;
|
||||
case "PREPARING"://
|
||||
case "SUPER_CHAT_MESSAGE_JPN":
|
||||
case "NOTICE_MSG":
|
||||
case "HOT_RANK_CHANGED"://榜单更新等无用信息
|
||||
|
@ -453,6 +453,8 @@ public class LiveUtils {
|
||||
if (json != null) {
|
||||
Log.i("登记直播:"+roomId);
|
||||
infoMap.put(roomId, json);
|
||||
}else{
|
||||
infoMap.remove(roomId);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -248,6 +248,9 @@ public class QQBotManager implements ApplicationContextAware {
|
||||
builder.append("\n");
|
||||
for (Live live : Live.lives) {
|
||||
JSONObject liveJson = LiveUtils.LiveInfoManager.getInstance().getInfo(live.getInfo().getRoomid());
|
||||
if(LiveUtils.isLivePlayer(live.getInfo().getRoomid())){
|
||||
builder.append("[直播中]");
|
||||
}
|
||||
builder
|
||||
.append("名字:").append(live.geData().getName()).append(" ")
|
||||
.append(" roomId:").append(live.geData().getRoomid()).append(" ");
|
||||
|
Loading…
Reference in New Issue
Block a user