| | |
| | | d.Add("homeId", DB_ResidenceData.Instance.CurrentRegion.id); |
| | | d.Add("deviceIds", functionIds); |
| | | var responsePackNew = RequestServerhomeId(d, NewAPI.Api_Post_RefreshDeviceStatus, "刷新设备状态"); |
| | | if (!this.dataChecking(responsePackNew)) |
| | | if (!this.DataChecking(responsePackNew)) |
| | | { |
| | | return; |
| | | } |
| | |
| | | d.Add("homeId", DB_ResidenceData.Instance.CurrentRegion.id); |
| | | d.Add("deviceIds", new List<string> { music.deviceId }); |
| | | var responsePackNew = RequestServerhomeId(d, NewAPI.Api_Post_PlayerList, "获取音乐列表"); |
| | | if (!this.dataChecking(responsePackNew)) |
| | | if (!this.DataChecking(responsePackNew)) |
| | | { |
| | | return; |
| | | } |
| | |
| | | } |
| | | d.Add("deviceInfos", new List<Dictionary<string, object>> { deviceIds }); |
| | | var responsePackNew = RequestServerhomeId(d, NewAPI.Api_Post_GroupList, "获取列表名列表"); |
| | | if (!this.dataChecking(responsePackNew)) |
| | | if (!this.DataChecking(responsePackNew)) |
| | | { |
| | | return new List<GroupList>(); |
| | | } |
| | |
| | | d.Add("sidGroups", new List<Dictionary<string, object>> { d1 }); |
| | | |
| | | var responsePackNew = RequestServerhomeId(d, NewAPI.Api_Post_GroupPlayerList, "通过列表名获取歌曲列表"); |
| | | if (!this.dataChecking(responsePackNew)) |
| | | if (!this.DataChecking(responsePackNew)) |
| | | { |
| | | return new List<PalyerSongListInfo>(); |
| | | } |
| | |
| | | /// </summary> |
| | | /// <param name="responsePackNew">回复数据对象</param> |
| | | /// <returns></returns> |
| | | private bool dataChecking(ResponsePackNew responsePackNew) |
| | | private bool DataChecking(ResponsePackNew responsePackNew) |
| | | { |
| | | if (responsePackNew.Code != "0" || responsePackNew.Data == null || responsePackNew.Data.ToString() == "") |
| | | if (responsePackNew.Data == null||responsePackNew.Code != "0" || responsePackNew.Data.ToString() == "") |
| | | { |
| | | |
| | | return false; |
| | | } |
| | | return true; |