/QingTingFanBianYi/src/fm/qingting/qtradio/parser/NetParser.java
Java | 3881 lines | 3503 code | 80 blank | 298 comment | 962 complexity | ac312945e57d34af242a990a996aa715 MD5 | raw file
Large files files are truncated, but you can click here to view the full file
- package fm.qingting.qtradio.parser;
- import android.app.Activity;
- import android.util.Log;
- import com.alibaba.fastjson.JSON;
- import com.alibaba.fastjson.JSONArray;
- import com.alibaba.fastjson.JSONObject;
- import com.umeng.analytics.MobclickAgent;
- import fm.qingting.framework.data.DataParserImpl;
- import fm.qingting.framework.data.Result;
- import fm.qingting.qtradio.abtest.ABTest;
- import fm.qingting.qtradio.ad.AdConfig;
- import fm.qingting.qtradio.ad.AdPos;
- import fm.qingting.qtradio.ad.platforms.mediav.MediaVAgent;
- import fm.qingting.qtradio.helper.ChannelHelper;
- import fm.qingting.qtradio.im.info.GroupInfo;
- import fm.qingting.qtradio.im.message.IMMessage;
- import fm.qingting.qtradio.jd.data.CommodityInfo;
- import fm.qingting.qtradio.model.ActivityNode;
- import fm.qingting.qtradio.model.AdvertisementItemNode;
- import fm.qingting.qtradio.model.AdvertisementItemNode.AdTrackers;
- import fm.qingting.qtradio.model.Attribute;
- import fm.qingting.qtradio.model.Attributes;
- import fm.qingting.qtradio.model.BillboardItemNode;
- import fm.qingting.qtradio.model.BroadcasterNode;
- import fm.qingting.qtradio.model.CategoryNode;
- import fm.qingting.qtradio.model.ChannelNode;
- import fm.qingting.qtradio.model.GameBean;
- import fm.qingting.qtradio.model.H5Bean;
- import fm.qingting.qtradio.model.InfoManager;
- import fm.qingting.qtradio.model.MediaCenter;
- import fm.qingting.qtradio.model.Node;
- import fm.qingting.qtradio.model.PingInfoV6;
- import fm.qingting.qtradio.model.PlayHistoryNode;
- import fm.qingting.qtradio.model.ProgramABTestBean;
- import fm.qingting.qtradio.model.ProgramNode;
- import fm.qingting.qtradio.model.ProgramSchedule;
- import fm.qingting.qtradio.model.ProgramScheduleList;
- import fm.qingting.qtradio.model.ProgramTopicNode;
- import fm.qingting.qtradio.model.QTADLocation;
- import fm.qingting.qtradio.model.QTLocation;
- import fm.qingting.qtradio.model.RecommendCategoryNode;
- import fm.qingting.qtradio.model.RecommendItemNode;
- import fm.qingting.qtradio.model.RecommendPlayingItemNode;
- import fm.qingting.qtradio.model.SharedCfg;
- import fm.qingting.qtradio.model.SpecialTopicNode;
- import fm.qingting.qtradio.model.WemartBean;
- import fm.qingting.qtradio.room.AdminInfo;
- import fm.qingting.qtradio.room.SnsInfo;
- import fm.qingting.qtradio.room.UserInfo;
- import fm.qingting.qtradio.search.SearchHotKeyword;
- import fm.qingting.qtradio.search.SearchItemNode;
- import fm.qingting.qtradio.search.SearchNode.NewSearchComparator;
- import fm.qingting.qtradio.search.SearchNode.SearchResult;
- import fm.qingting.qtradio.social.MiniFavNode;
- import fm.qingting.qtradio.social.UserProfile;
- import fm.qingting.utils.AppInfo;
- import fm.qingting.utils.ThirdTracker;
- import fm.qingting.utils.TimeUtil;
- import fm.qingting.utils.UserDataUtil;
- import java.util.ArrayList;
- import java.util.Collections;
- import java.util.HashMap;
- import java.util.List;
- import java.util.Map;
- public class NetParser extends DataParserImpl
- {
- private ActivityNode _parseActivity(JSONObject paramJSONObject)
- {
- if (paramJSONObject != null)
- try
- {
- ActivityNode localActivityNode = new ActivityNode();
- localActivityNode.id = paramJSONObject.getIntValue("id");
- localActivityNode.name = paramJSONObject.getString("title");
- localActivityNode.type = paramJSONObject.getString("type");
- localActivityNode.contentUrl = paramJSONObject.getString("url");
- localActivityNode.infoUrl = null;
- localActivityNode.infoTitle = paramJSONObject.getString("description");
- return localActivityNode;
- }
- catch (Exception paramJSONObject)
- {
- return null;
- }
- return null;
- }
- private AdminInfo _parseAdminInfo(JSONObject paramJSONObject)
- {
- if (paramJSONObject != null)
- try
- {
- AdminInfo localAdminInfo = new AdminInfo();
- localAdminInfo.userKey = paramJSONObject.getString("userid");
- localAdminInfo.snsInfo.sns_avatar = paramJSONObject.getString("avatar");
- localAdminInfo.snsInfo.sns_name = paramJSONObject.getString("username");
- if (localAdminInfo.snsInfo.sns_name == null)
- localAdminInfo.snsInfo.sns_name = "蜻蜓管理员";
- localAdminInfo.snsInfo.signature = paramJSONObject.getString("signature");
- localAdminInfo.snsInfo.age = paramJSONObject.getIntValue("age");
- localAdminInfo.snsInfo.sns_gender = paramJSONObject.getString("gender");
- String str = paramJSONObject.getString("is_blocked");
- localAdminInfo.weiboName = paramJSONObject.getString("weiboname");
- if ((str != null) && (!str.equalsIgnoreCase("")))
- if (Integer.valueOf(str).intValue() != 0)
- break label188;
- label188: for (localAdminInfo.isBlocked = false; ; localAdminInfo.isBlocked = true)
- {
- str = paramJSONObject.getString("level");
- paramJSONObject = localAdminInfo;
- if (str == null)
- break;
- paramJSONObject = localAdminInfo;
- if (str.equalsIgnoreCase(""))
- break;
- localAdminInfo.level = Integer.valueOf(str).intValue();
- return localAdminInfo;
- }
- }
- catch (Exception paramJSONObject)
- {
- }
- else
- paramJSONObject = null;
- return paramJSONObject;
- }
- private ChannelNode _parseChannelNode(JSONObject paramJSONObject)
- {
- int j = 0;
- if (paramJSONObject != null)
- try
- {
- ChannelNode localChannelNode = new ChannelNode();
- if (paramJSONObject.containsKey("channel_star"))
- {
- localChannelNode.ratingStar = paramJSONObject.getIntValue("channel_star");
- localChannelNode.channelId = paramJSONObject.getIntValue("id");
- localChannelNode.title = paramJSONObject.getString("title");
- localChannelNode.desc = paramJSONObject.getString("description");
- localChannelNode.groupId = paramJSONObject.getIntValue("chatgroup_id");
- localChannelNode.categoryId = paramJSONObject.getIntValue("category_id");
- localChannelNode.update_time = paramJSONObject.getString("update_time");
- localObject = paramJSONObject.getJSONObject("thumbs");
- if (localObject != null)
- {
- localChannelNode.setSmallThumb(((JSONObject)localObject).getString("200_thumb"));
- localChannelNode.setMediumThumb(((JSONObject)localObject).getString("400_thumb"));
- localChannelNode.setLargeThumb(((JSONObject)localObject).getString("800_thumb"));
- if (localChannelNode.noThumb())
- {
- localChannelNode.setSmallThumb(((JSONObject)localObject).getString("small_thumb"));
- localChannelNode.setMediumThumb(((JSONObject)localObject).getString("medium_thumb"));
- localChannelNode.setLargeThumb(((JSONObject)localObject).getString("large_thumb"));
- }
- }
- localObject = paramJSONObject.getString("type");
- if ((localObject == null) || (!((String)localObject).equalsIgnoreCase("channel_ondemand")))
- break label384;
- localChannelNode.channelType = 1;
- label197: if (paramJSONObject.getIntValue("auto_play") != 0)
- break label392;
- localChannelNode.autoPlay = false;
- label211: if (paramJSONObject.getIntValue("record_enabled") != 0)
- break label400;
- localChannelNode.recordEnable = false;
- label225: if (!localChannelNode.isLiveChannel())
- break label408;
- localChannelNode.audienceCnt = paramJSONObject.getIntValue("audience_count");
- localObject = paramJSONObject.getJSONObject("mediainfo");
- if (localObject != null)
- localChannelNode.resId = ((JSONObject)localObject).getIntValue("id");
- }
- BroadcasterNode localBroadcasterNode;
- while (true)
- {
- localObject = paramJSONObject.getJSONObject("detail");
- paramJSONObject = localChannelNode;
- if (localObject == null)
- break label582;
- localChannelNode.programCnt = ((JSONObject)localObject).getIntValue("program_count");
- paramJSONObject = ((JSONObject)localObject).getJSONArray("authors");
- if (paramJSONObject == null)
- break label422;
- i = 0;
- while (i < paramJSONObject.size())
- {
- localBroadcasterNode = parseBroadcasterNode(paramJSONObject.getJSONObject(i));
- if (localChannelNode.lstAuthors == null)
- localChannelNode.lstAuthors = new ArrayList();
- localChannelNode.lstAuthors.add(localBroadcasterNode);
- i += 1;
- }
- if (!paramJSONObject.containsKey("star"))
- break;
- localChannelNode.ratingStar = paramJSONObject.getIntValue("star");
- break;
- label384: localChannelNode.channelType = 0;
- break label197;
- label392: localChannelNode.autoPlay = true;
- break label211;
- label400: localChannelNode.recordEnable = true;
- break label225;
- label408: localChannelNode.latest_program = paramJSONObject.getString("latest_program");
- }
- label422: paramJSONObject = ((JSONObject)localObject).getJSONArray("broadcasters");
- if (paramJSONObject != null)
- {
- i = 0;
- while (i < paramJSONObject.size())
- {
- localBroadcasterNode = parseBroadcasterNode(paramJSONObject.getJSONObject(i));
- if (localChannelNode.lstBroadcaster == null)
- localChannelNode.lstBroadcaster = new ArrayList();
- localChannelNode.lstBroadcaster.add(localBroadcasterNode);
- i += 1;
- }
- }
- Object localObject = ((JSONObject)localObject).getJSONArray("podcasters");
- paramJSONObject = localChannelNode;
- if (localObject == null)
- break label582;
- int i = j;
- while (true)
- {
- paramJSONObject = localChannelNode;
- if (i >= ((JSONArray)localObject).size())
- break;
- paramJSONObject = _parsePodcaster(((JSONArray)localObject).getJSONObject(i));
- if (localChannelNode.lstPodcasters == null)
- localChannelNode.lstPodcasters = new ArrayList();
- if (paramJSONObject != null)
- localChannelNode.lstPodcasters.add(paramJSONObject);
- i += 1;
- }
- }
- catch (Exception paramJSONObject)
- {
- }
- else
- paramJSONObject = null;
- label582: return paramJSONObject;
- }
- private ProgramNode _parseLiveProgramNode(JSONObject paramJSONObject, int paramInt)
- {
- int i = 0;
- if (paramJSONObject != null)
- {
- ProgramNode localProgramNode = new ProgramNode();
- localProgramNode.id = paramJSONObject.getIntValue("id");
- localProgramNode.startTime = paramJSONObject.getString("start_time");
- localProgramNode.endTime = paramJSONObject.getString("end_time");
- if ((paramInt != 0) || ((localProgramNode.endTime != null) && (localProgramNode.endTime.equalsIgnoreCase("00:00:00"))))
- localProgramNode.endTime = "23:59:00";
- localProgramNode.title = paramJSONObject.getString("title");
- localProgramNode.channelId = paramJSONObject.getIntValue("channel_id");
- localProgramNode.uniqueId = paramJSONObject.getIntValue("program_id");
- localProgramNode.groupId = paramJSONObject.getIntValue("chatgroup_id");
- localProgramNode.dayOfWeek = paramInt;
- localProgramNode.channelType = 0;
- Object localObject = paramJSONObject.getJSONObject("mediainfo");
- if (localObject != null)
- localProgramNode.resId = ((JSONObject)localObject).getIntValue("id");
- localObject = InfoManager.getInstance().getProgramABTest(localProgramNode.channelId, localProgramNode.uniqueId);
- if (localObject != null)
- {
- localProgramNode.resId = ((ProgramABTestBean)localObject).resId;
- localProgramNode.title = ((ProgramABTestBean)localObject).title;
- }
- paramJSONObject = paramJSONObject.getJSONObject("detail");
- if (paramJSONObject != null)
- {
- paramJSONObject = paramJSONObject.getJSONArray("broadcasters");
- if (paramJSONObject != null)
- {
- localProgramNode.lstBroadcaster = new ArrayList();
- paramInt = i;
- while (paramInt < paramJSONObject.size())
- {
- localObject = new BroadcasterNode();
- JSONObject localJSONObject = paramJSONObject.getJSONObject(paramInt);
- ((BroadcasterNode)localObject).id = localJSONObject.getIntValue("id");
- ((BroadcasterNode)localObject).nick = localJSONObject.getString("username");
- ((BroadcasterNode)localObject).avatar = localJSONObject.getString("thumb");
- ((BroadcasterNode)localObject).weiboId = localJSONObject.getString("weibo_id");
- ((BroadcasterNode)localObject).weiboName = localJSONObject.getString("weibo_name");
- ((BroadcasterNode)localObject).qqId = localJSONObject.getString("qq_id");
- ((BroadcasterNode)localObject).qqName = localJSONObject.getString("qq_name");
- localProgramNode.lstBroadcaster.add(localObject);
- paramInt += 1;
- }
- }
- }
- return localProgramNode;
- }
- return null;
- }
- private List<PingInfoV6> _parseMediaCenter(JSONObject paramJSONObject, int paramInt)
- {
- int i = 0;
- if (paramJSONObject != null)
- try
- {
- JSONArray localJSONArray = paramJSONObject.getJSONArray("mediacenters");
- double d = paramJSONObject.getDoubleValue("preference_change_cost");
- if (localJSONArray != null)
- {
- ArrayList localArrayList = new ArrayList();
- paramJSONObject = localArrayList;
- if (i >= localJSONArray.size())
- break label233;
- Object localObject = localJSONArray.getJSONObject(i);
- paramJSONObject = new PingInfoV6();
- paramJSONObject.domain = ((JSONObject)localObject).getString("domain");
- paramJSONObject.backupIP = ((JSONObject)localObject).getString("backup_ips");
- paramJSONObject.weight = ((JSONObject)localObject).getIntValue("weight");
- paramJSONObject.testpath = ((JSONObject)localObject).getString("test_path");
- paramJSONObject.accessExp = ((JSONObject)localObject).getString("access");
- paramJSONObject.replayExp = ((JSONObject)localObject).getString("replay");
- paramJSONObject.res = ((JSONObject)localObject).getString("result");
- paramJSONObject.codename = ((JSONObject)localObject).getString("codename");
- paramJSONObject.channelType = paramInt;
- paramJSONObject.pcc = d;
- localObject = ((JSONObject)localObject).getString("type");
- if ((localObject != null) && (((String)localObject).equalsIgnoreCase("cdn")));
- for (paramJSONObject.isCDN = true; ; paramJSONObject.isCDN = false)
- {
- localArrayList.add(paramJSONObject);
- i += 1;
- break;
- }
- }
- }
- catch (Exception paramJSONObject)
- {
- }
- else
- paramJSONObject = null;
- label233: return paramJSONObject;
- }
- private List<RecommendItemNode> _parseNewRecommendV2Banner(JSONObject paramJSONObject, List<RecommendItemNode> paramList)
- {
- if ((paramJSONObject != null) && (paramList != null))
- {
- JSONArray localJSONArray = paramJSONObject.getJSONArray("data");
- int i = 0;
- while (true)
- {
- paramJSONObject = paramList;
- if (i >= localJSONArray.size())
- break;
- paramJSONObject = _parseRecommendNode(localJSONArray.getJSONObject(i));
- if (paramJSONObject != null)
- paramList.add(paramJSONObject);
- i += 1;
- }
- }
- paramJSONObject = null;
- return paramJSONObject;
- }
- private UserInfo _parsePodcaster(JSONObject paramJSONObject)
- {
- if (paramJSONObject != null)
- {
- UserInfo localUserInfo = new UserInfo();
- localUserInfo.userId = paramJSONObject.getString("user_system_id");
- localUserInfo.userKey = localUserInfo.userId;
- localUserInfo.isBlocked = false;
- localUserInfo.isPodcaster = true;
- localUserInfo.podcasterId = paramJSONObject.getIntValue("id");
- localUserInfo.podcasterName = paramJSONObject.getString("nickname");
- localUserInfo.fansNumber = paramJSONObject.getLong("fan_num").longValue();
- localUserInfo.snsInfo.signature = paramJSONObject.getString("signature");
- localUserInfo.snsInfo.sns_id = paramJSONObject.getString("weibo_id");
- localUserInfo.snsInfo.sns_name = paramJSONObject.getString("weibo_name");
- if (localUserInfo.snsInfo.sns_name == null)
- localUserInfo.snsInfo.sns_name = "蜻蜓主播";
- localUserInfo.snsInfo.sns_avatar = paramJSONObject.getString("avatar");
- localUserInfo.snsInfo.desc = paramJSONObject.getString("description");
- int i = paramJSONObject.getIntValue("sex");
- if (i == 0)
- localUserInfo.snsInfo.sns_gender = "n";
- do
- {
- return localUserInfo;
- if (i == 1)
- {
- localUserInfo.snsInfo.sns_gender = "m";
- return localUserInfo;
- }
- }
- while (i != 2);
- localUserInfo.snsInfo.sns_gender = "f";
- return localUserInfo;
- }
- return null;
- }
- private UserInfo _parsePodcasterNew(JSONObject paramJSONObject)
- {
- boolean bool = true;
- if (paramJSONObject != null)
- {
- UserInfo localUserInfo = new UserInfo();
- localUserInfo.userId = paramJSONObject.getString("userid");
- localUserInfo.userKey = localUserInfo.userId;
- localUserInfo.isPodcaster = true;
- localUserInfo.podcasterId = paramJSONObject.getIntValue("pid");
- localUserInfo.podcasterName = paramJSONObject.getString("username");
- localUserInfo.fansNumber = paramJSONObject.getLong("fan_num").longValue();
- localUserInfo.snsInfo.signature = paramJSONObject.getString("signature");
- localUserInfo.snsInfo.sns_id = paramJSONObject.getString("weibo_id");
- localUserInfo.snsInfo.sns_name = paramJSONObject.getString("weibo_name");
- if (localUserInfo.snsInfo.sns_name == null)
- localUserInfo.snsInfo.sns_name = "蜻蜓主播";
- localUserInfo.snsInfo.sns_avatar = paramJSONObject.getString("avatar");
- localUserInfo.snsInfo.desc = paramJSONObject.getString("description");
- int i = paramJSONObject.getIntValue("gender");
- if (i == 0)
- {
- localUserInfo.snsInfo.sns_gender = "n";
- if (paramJSONObject.getInteger("is_blocked").intValue() != 1)
- break label238;
- }
- while (true)
- {
- localUserInfo.isBlocked = bool;
- return localUserInfo;
- if (i == 1)
- {
- localUserInfo.snsInfo.sns_gender = "m";
- break;
- }
- if (i != 2)
- break;
- localUserInfo.snsInfo.sns_gender = "f";
- break;
- label238: bool = false;
- }
- }
- return null;
- }
- private ProgramNode _parseProgramTempNode(JSONObject paramJSONObject)
- {
- if (paramJSONObject != null)
- try
- {
- ProgramNode localProgramNode = new ProgramNode();
- localProgramNode.mLiveInVirtual = true;
- localProgramNode.dayOfWeek = 0;
- localProgramNode.id = paramJSONObject.getIntValue("id");
- localProgramNode.uniqueId = localProgramNode.id;
- localProgramNode.channelType = 0;
- localProgramNode.title = paramJSONObject.getString("title");
- localProgramNode.duration = paramJSONObject.getDoubleValue("duration");
- localProgramNode.sequence = paramJSONObject.getIntValue("sequence");
- localProgramNode.startTime = paramJSONObject.getString("start_time");
- long l = TimeUtil.dateToMS(localProgramNode.startTime);
- localProgramNode.startTime = TimeUtil.msToDate3(l);
- localProgramNode.setAbsoluteStartTime(l / 1000L);
- localProgramNode.endTime = paramJSONObject.getString("end_time");
- l = TimeUtil.dateToMS(localProgramNode.endTime);
- localProgramNode.endTime = TimeUtil.msToDate3(l);
- localProgramNode.setAbsoluteEndTime(l / 1000L);
- localProgramNode.sequence = paramJSONObject.getIntValue("sequence");
- localProgramNode.groupId = paramJSONObject.getIntValue("chatgroup_id");
- paramJSONObject = paramJSONObject.getJSONObject("mediainfo");
- if (paramJSONObject != null)
- localProgramNode.resId = paramJSONObject.getIntValue("id");
- return localProgramNode;
- }
- catch (Exception paramJSONObject)
- {
- }
- return null;
- }
- private RecommendItemNode _parseRecommendItemNode(JSONObject paramJSONObject, boolean paramBoolean)
- {
- Object localObject2 = null;
- Object localObject1 = localObject2;
- if (paramJSONObject != null);
- try
- {
- RecommendItemNode localRecommendItemNode = new RecommendItemNode();
- localRecommendItemNode.name = paramJSONObject.getString("title");
- JSONObject localJSONObject1;
- JSONObject localJSONObject2;
- int k;
- if (!paramBoolean)
- {
- localJSONObject1 = paramJSONObject.getJSONObject("thumbs");
- if (localJSONObject1 != null)
- {
- localRecommendItemNode.setSmallThumb(localJSONObject1.getString("200_thumb"));
- localRecommendItemNode.setMediumThumb(localJSONObject1.getString("400_thumb"));
- localRecommendItemNode.setLargeThumb(localJSONObject1.getString("800_thumb"));
- }
- if (localRecommendItemNode.noThumb())
- localRecommendItemNode.setSmallThumb(paramJSONObject.getString("thumb"));
- localRecommendItemNode.update_time = paramJSONObject.getString("update_time");
- localJSONObject2 = paramJSONObject.getJSONObject("detail");
- if (localJSONObject2 == null)
- break label667;
- if (!localJSONObject2.containsKey("channel_star"))
- break label332;
- localRecommendItemNode.ratingStar = localJSONObject2.getIntValue("channel_star");
- k = 1;
- }
- while (true)
- {
- label148: localJSONObject1 = paramJSONObject.getJSONObject("parent_info");
- int i;
- int j;
- label211: int m;
- if (localJSONObject1 != null)
- {
- paramJSONObject = localJSONObject1.getString("parent_type");
- if (paramJSONObject != null)
- if ((paramJSONObject.equalsIgnoreCase("channel")) || (paramJSONObject.equalsIgnoreCase("channel_ondemand")))
- {
- i = localJSONObject1.getIntValue("parent_id");
- paramJSONObject = localJSONObject1.getString("parent_name");
- j = 0;
- localObject1 = localJSONObject1.getJSONObject("parent_extra");
- localJSONObject1 = paramJSONObject;
- m = i;
- if (localObject1 != null)
- {
- j = ((JSONObject)localObject1).getIntValue("category_id");
- localRecommendItemNode.mCategoryId = j;
- m = i;
- }
- }
- }
- for (localJSONObject1 = paramJSONObject; ; localJSONObject1 = null)
- {
- paramJSONObject = localJSONObject2.getString("type");
- if (paramJSONObject.equalsIgnoreCase("program_ondemand"))
- {
- paramJSONObject = _parseVirtualProgramNode(localJSONObject2, 0);
- paramJSONObject.channelId = m;
- if (localJSONObject1 != null)
- paramJSONObject.setChannelName(localJSONObject1);
- if (k != 0)
- paramJSONObject.channelRatingStar = localRecommendItemNode.ratingStar;
- localRecommendItemNode.setDetail(paramJSONObject);
- break label667;
- localRecommendItemNode.setSmallThumb(paramJSONObject.getString("thumb"));
- break;
- label332: if (!localJSONObject2.containsKey("star"))
- break label661;
- localRecommendItemNode.ratingStar = localJSONObject2.getIntValue("star");
- k = 1;
- break label148;
- if (!paramJSONObject.equalsIgnoreCase("category"))
- break label639;
- j = localJSONObject1.getIntValue("parent_id");
- i = 0;
- paramJSONObject = null;
- break label211;
- }
- if (paramJSONObject.equalsIgnoreCase("channel_ondemand"))
- {
- paramJSONObject = _parseChannelNode(localJSONObject2);
- paramJSONObject.categoryId = j;
- if (k != 0)
- paramJSONObject.ratingStar = localRecommendItemNode.ratingStar;
- localRecommendItemNode.setDetail(paramJSONObject);
- break label667;
- }
- if (paramJSONObject.equalsIgnoreCase("channel_live"))
- {
- paramJSONObject = _parseChannelNode(localJSONObject2);
- paramJSONObject.categoryId = j;
- if (k != 0)
- paramJSONObject.ratingStar = localRecommendItemNode.ratingStar;
- localRecommendItemNode.setDetail(paramJSONObject);
- break label667;
- }
- if (paramJSONObject.equalsIgnoreCase("topic"))
- {
- paramJSONObject = _parseSpecialTopicNode(localJSONObject2);
- if (paramJSONObject != null)
- {
- localRecommendItemNode.mCategoryId = paramJSONObject.categoryId;
- if (k != 0)
- paramJSONObject.channelStar = localRecommendItemNode.ratingStar;
- localRecommendItemNode.setDetail(paramJSONObject);
- }
- if (k == 0)
- break label667;
- paramJSONObject.channelStar = localRecommendItemNode.ratingStar;
- break label667;
- }
- if (paramJSONObject.equalsIgnoreCase("activity"))
- {
- localRecommendItemNode.setDetail(_parseActivity(localJSONObject2));
- break label667;
- }
- localObject1 = localObject2;
- if (!paramJSONObject.equalsIgnoreCase("program_temp"))
- break label671;
- paramJSONObject = _parseProgramTempNode(localJSONObject2);
- if (paramJSONObject != null)
- {
- paramJSONObject.mLiveInVirtual = true;
- paramJSONObject.channelId = m;
- if (localJSONObject1 != null)
- paramJSONObject.setChannelName(localJSONObject1);
- localRecommendItemNode.setDetail(paramJSONObject);
- }
- if (k == 0)
- break label667;
- paramJSONObject.channelRatingStar = localRecommendItemNode.ratingStar;
- break label667;
- label639: j = 0;
- i = 0;
- paramJSONObject = null;
- break label211;
- j = 0;
- m = 0;
- }
- label661: k = 0;
- }
- label667: localObject1 = localRecommendItemNode;
- label671: return localObject1;
- }
- catch (Exception paramJSONObject)
- {
- }
- return null;
- }
- private RecommendItemNode _parseRecommendNode(JSONObject paramJSONObject)
- {
- return null;
- }
- private RecommendPlayingItemNode _parseRecommendPlayingProgram(JSONObject paramJSONObject)
- {
- if (paramJSONObject != null)
- try
- {
- JSONObject localJSONObject = paramJSONObject.getJSONObject("detail");
- if (localJSONObject == null)
- return null;
- RecommendPlayingItemNode localRecommendPlayingItemNode = new RecommendPlayingItemNode();
- localRecommendPlayingItemNode.channelName = paramJSONObject.getString("sub_title");
- localRecommendPlayingItemNode.programName = paramJSONObject.getString("title");
- localRecommendPlayingItemNode.thumb = paramJSONObject.getString("thumb");
- if (paramJSONObject.containsKey("channel_star"))
- localRecommendPlayingItemNode.ratingStar = paramJSONObject.getIntValue("channel_star");
- if (localJSONObject.containsKey("channel_star"))
- localRecommendPlayingItemNode.ratingStar = localJSONObject.getIntValue("channel_star");
- paramJSONObject = localJSONObject.getJSONObject("mediainfo");
- if (paramJSONObject != null)
- localRecommendPlayingItemNode.resId = paramJSONObject.getIntValue("id");
- localRecommendPlayingItemNode.channelId = localJSONObject.getIntValue("channel_id");
- localRecommendPlayingItemNode.programid = localJSONObject.getIntValue("id");
- localRecommendPlayingItemNode.startTime = localJSONObject.getString("start_time");
- if ((localRecommendPlayingItemNode.startTime != null) && (localRecommendPlayingItemNode.startTime.equalsIgnoreCase("00:00:00")))
- localRecommendPlayingItemNode.startTime = "00:00:01";
- localRecommendPlayingItemNode.endTime = localJSONObject.getString("end_time");
- if ((localRecommendPlayingItemNode.endTime != null) && (localRecommendPlayingItemNode.endTime.equalsIgnoreCase("00:00:00")))
- localRecommendPlayingItemNode.endTime = "23:59:59";
- return localRecommendPlayingItemNode;
- }
- catch (Exception paramJSONObject)
- {
- }
- return null;
- }
- private SpecialTopicNode _parseSpecialTopicNode(JSONObject paramJSONObject)
- {
- if (paramJSONObject != null)
- try
- {
- SpecialTopicNode localSpecialTopicNode = new SpecialTopicNode();
- localSpecialTopicNode.id = (paramJSONObject.getIntValue("id") + 1000001);
- localSpecialTopicNode.title = paramJSONObject.getString("title");
- localSpecialTopicNode.thumb = paramJSONObject.getString("thumb");
- localSpecialTopicNode.desc = paramJSONObject.getString("description");
- localSpecialTopicNode.categoryId = paramJSONObject.getIntValue("category_id");
- localSpecialTopicNode.create_time = paramJSONObject.getString("create_time");
- localSpecialTopicNode.update_time = paramJSONObject.getString("update_time");
- return localSpecialTopicNode;
- }
- catch (Exception paramJSONObject)
- {
- }
- return null;
- }
- private UserInfo _parseUserInfo(JSONObject paramJSONObject)
- {
- if (paramJSONObject != null)
- try
- {
- UserInfo localUserInfo = new UserInfo();
- localUserInfo.userKey = paramJSONObject.getString("userId");
- localUserInfo.snsInfo.sns_avatar = paramJSONObject.getString("avatar");
- localUserInfo.snsInfo.sns_name = paramJSONObject.getString("userName");
- if (localUserInfo.snsInfo.sns_name == null)
- localUserInfo.snsInfo.sns_name = "蜻蜓用户";
- localUserInfo.snsInfo.signature = paramJSONObject.getString("signature");
- localUserInfo.snsInfo.age = paramJSONObject.getIntValue("age");
- localUserInfo.snsInfo.sns_gender = paramJSONObject.getString("gender");
- String str = paramJSONObject.getString("is_blocked");
- if ((str != null) && (!str.equalsIgnoreCase("")))
- if (Integer.valueOf(str).intValue() != 0)
- break label181;
- label181: for (localUserInfo.isBlocked = false; ; localUserInfo.isBlocked = true)
- {
- str = paramJSONObject.getString("level");
- paramJSONObject = localUserInfo;
- if (str == null)
- break;
- paramJSONObject = localUserInfo;
- if (str.equalsIgnoreCase(""))
- break;
- localUserInfo.level = Integer.valueOf(str).intValue();
- return localUserInfo;
- }
- }
- catch (Exception paramJSONObject)
- {
- }
- else
- paramJSONObject = null;
- return paramJSONObject;
- }
- private ProgramNode _parseVirtualProgramNode(JSONObject paramJSONObject, int paramInt)
- {
- Object localObject2 = null;
- Object localObject1 = localObject2;
- String str;
- if (paramJSONObject != null)
- {
- str = paramJSONObject.getString("type");
- if ((str == null) || (str.equalsIgnoreCase("program_ondemand")))
- break label56;
- localObject1 = localObject2;
- if (str.equalsIgnoreCase("program_temp"))
- localObject1 = _parseProgramTempNode(paramJSONObject);
- }
- return localObject1;
- label56: localObject1 = new ProgramNode();
- ((ProgramNode)localObject1).id = paramJSONObject.getIntValue("id");
- ((ProgramNode)localObject1).uniqueId = ((ProgramNode)localObject1).id;
- ((ProgramNode)localObject1).channelType = 1;
- ((ProgramNode)localObject1).title = paramJSONObject.getString("title");
- ((ProgramNode)localObject1).duration = paramJSONObject.getDoubleValue("duration");
- ((ProgramNode)localObject1).sequence = paramJSONObject.getIntValue("sequence");
- ((ProgramNode)localObject1).createTime = paramJSONObject.getString("create_time");
- ((ProgramNode)localObject1).updateTime = paramJSONObject.getString("update_time");
- ((ProgramNode)localObject1).sequence = paramJSONObject.getIntValue("sequence");
- ((ProgramNode)localObject1).groupId = paramJSONObject.getIntValue("chatgroup_id");
- paramJSONObject = paramJSONObject.getJSONObject("mediainfo");
- if (paramJSONObject != null)
- {
- ((ProgramNode)localObject1).resId = paramJSONObject.getIntValue("id");
- paramJSONObject = paramJSONObject.getJSONArray("bitrates_url");
- if (paramJSONObject != null)
- {
- ((ProgramNode)localObject1).lstAudioPath = new ArrayList();
- ((ProgramNode)localObject1).lstBitrate = new ArrayList();
- paramInt = 0;
- while (paramInt < paramJSONObject.size())
- {
- localObject2 = paramJSONObject.getJSONObject(paramInt);
- if (localObject2 != null)
- {
- str = ((JSONObject)localObject2).getString("file_path");
- if (str != null)
- ((ProgramNode)localObject1).lstAudioPath.add(str);
- localObject2 = Integer.valueOf(((JSONObject)localObject2).getIntValue("bitrate"));
- if (localObject2 != null)
- ((ProgramNode)localObject1).lstBitrate.add(localObject2);
- }
- paramInt += 1;
- }
- }
- }
- return localObject1;
- }
- private Result parseADConfig(String paramString)
- {
- if ((paramString != null) && (!paramString.equalsIgnoreCase("")));
- while (true)
- {
- int i;
- try
- {
- Object localObject1 = ((JSONObject)JSON.parse(paramString)).getJSONArray("data");
- if (localObject1 != null)
- {
- ArrayList localArrayList = new ArrayList();
- i = 0;
- if (i < ((JSONArray)localObject1).size())
- {
- Object localObject2 = ((JSONArray)localObject1).getJSONObject(i);
- if (localObject2 == null)
- break label300;
- String str1 = ((JSONObject)localObject2).getString("name");
- String str2 = ((JSONObject)localObject2).getString("url");
- int k = ((JSONObject)localObject2).getIntValue("percent");
- localObject2 = ((JSONObject)localObject2).getString("region");
- AdConfig localAdConfig = new AdConfig();
- localAdConfig.name = str1;
- localAdConfig.url = str2;
- localAdConfig.percent = k;
- localAdConfig.mRegions = ((String)localObject2);
- localArrayList.add(localAdConfig);
- if (localAdConfig.percent <= 1000)
- break label300;
- int m = localAdConfig.percent / 1000;
- int j = 0;
- if (j >= m - 1)
- break label300;
- localAdConfig = new AdConfig();
- localAdConfig.name = str1;
- localAdConfig.url = str2;
- localAdConfig.percent = k;
- localAdConfig.mRegions = ((String)localObject2);
- localArrayList.add(localAdConfig);
- j += 1;
- continue;
- }
- MobclickAgent.onEvent(InfoManager.getInstance().getContext(), "parseADConfig", "succ");
- localObject1 = new Result(true, localArrayList);
- return localObject1;
- }
- }
- catch (Exception localException)
- {
- }
- MobclickAgent.onEvent(InfoManager.getInstance().getContext(), "parseADConfig", "f:" + paramString);
- return null;
- label300: i += 1;
- }
- }
- private Result parseADLocation(String paramString)
- {
- if ((paramString != null) && (!paramString.equalsIgnoreCase("")))
- try
- {
- paramString = ((JSONObject)JSON.parse(paramString)).getJSONObject("data");
- if ((paramString != null) && (paramString.getIntValue("errorno") == 0))
- {
- QTADLocation localQTADLocation = new QTADLocation();
- localQTADLocation.city = paramString.getString("city");
- localQTADLocation.regionCode = paramString.getString("region");
- localQTADLocation.school = paramString.getString("school");
- localQTADLocation.ip = paramString.getString("real_ip");
- paramString = new Result(true, localQTADLocation);
- return paramString;
- }
- }
- catch (Exception paramString)
- {
- }
- return null;
- }
- private Result parseADVFromAirWave(String paramString)
- {
- int j = 0;
- if ((paramString != null) && (!paramString.equalsIgnoreCase("")))
- try
- {
- Object localObject2 = ((JSONObject)JSON.parse(paramString)).getJSONObject("0A89BCB4E85400C4");
- if (localObject2 != null)
- {
- if (((JSONObject)localObject2).getIntValue("returncode") != 200)
- return null;
- paramString = new RecommendItemNode();
- paramString.name = "广告";
- paramString.setSmallThumb(((JSONObject)localObject2).getString("imgurl"));
- paramString.isweb = true;
- ActivityNode localActivityNode = new ActivityNode();
- localActivityNode.name = "广告";
- localActivityNode.infoUrl = paramString.getApproximativeThumb();
- localActivityNode.contentUrl = ((JSONObject)localObject2).getString("clickurl");
- localActivityNode.desc = localActivityNode.name;
- localActivityNode.infoTitle = localActivityNode.name;
- localActivityNode.putUserInfo = false;
- Object localObject1 = ((JSONObject)localObject2).getJSONArray("imgtracking");
- localObject2 = ((JSONObject)localObject2).getJSONArray("thclkurl");
- int i;
- if ((localObject1 != null) && (((JSONArray)localObject1).size() > 0))
- {
- localActivityNode.imageTracking = new ArrayList();
- i = 0;
- while (i < ((JSONArray)localObject1).size())
- {
- String str = (String)((JSONArray)localObject1).get(i);
- localActivityNode.imageTracking.add(str);
- i += 1;
- }
- }
- if ((localObject2 != null) && (((JSONArray)localObject2).size() > 0))
- {
- localActivityNode.clickTracking = new ArrayList();
- i = j;
- while (i < ((JSONArray)localObject2).size())
- {
- localObject1 = (String)((JSONArray)localObject2).get(i);
- localActivityNode.clickTracking.add(localObject1);
- i += 1;
- }
- }
- paramString.mNode = localActivityNode;
- paramString = new Result(true, paramString);
- return paramString;
- }
- }
- catch (Exception paramString)
- {
- }
- return null;
- }
- private Result parseADWhiteList(String paramString)
- {
- if ((paramString != null) && (!paramString.equalsIgnoreCase("")));
- while (true)
- {
- int i;
- try
- {
- paramString = ((JSONObject)JSON.parse(paramString)).getJSONArray("data");
- if (paramString != null)
- {
- ArrayList localArrayList = new ArrayList();
- i = 0;
- if (i < paramString.size())
- {
- String str = paramString.getString(i);
- if (str == null)
- break label91;
- localArrayList.add(Integer.valueOf(str));
- break label91;
- }
- paramString = new Result(true, localArrayList);
- return paramString;
- }
- }
- catch (Exception paramString)
- {
- }
- return null;
- label91: i += 1;
- }
- }
- private Result parseAMAdConfig(String paramString)
- {
- if ((paramString != null) && (!paramString.equalsIgnoreCase("")));
- while (true)
- {
- int i;
- try
- {
- Object localObject = ((JSONObject)JSON.parse(paramString)).getJSONArray("data");
- if (localObject != null)
- {
- ArrayList localArrayList = new ArrayList();
- i = 0;
- if (i < ((JSONArray)localObject).size())
- {
- JSONObject localJSONObject = ((JSONArray)localObject).getJSONObject(i);
- if (localJSONObject == null)
- break label251;
- AdConfig localAdConfig = new AdConfig();
- localAdConfig.mAdvId = localJSONObject.getString("advid");
- localAdConfig.mAdMasterUrl = localJSONObject.getString("admasterurl");
- localAdConfig.mMiaozhenUrl = localJSONObject.getString("miaozhenurl");
- localAdConfig.mCustomerUrl = localJSONObject.getString("customerurl");
- localAdConfig.mMMAUrl = localJSONObject.getString("mmaurl");
- localAdConfig.mRegions = localJSONObject.getString("regions");
- localAdConfig.percent = localJSONObject.getIntValue("percent");
- localAdConfig.mEventType = localJSONObject.getString("eventtype");
- localArrayList.add(localAdConfig);
- break label251;
- }
- MobclickAgent.onEvent(InfoManager.getInstance().getContext(), "parseAMAdConfig", "succ");
- localObject = new Result(true, localArrayList);
- return localObject;
- }
- }
- catch (Exception localException)
- {
- }
- MobclickAgent.onEvent(InfoManager.getInstance().getContext(), "parseAMAdConfig", "f:" + paramString);
- return null;
- label251: i += 1;
- }
- }
- private Result parseAdsPos(String paramString)
- {
- if ((paramString != null) && (!paramString.equalsIgnoreCase("")))
- try
- {
- paramString = ((JSONObject)JSON.parse(paramString)).getJSONArray("data");
- if (paramString != null)
- {
- ArrayList localArrayList = new ArrayList();
- int i = 0;
- while (i < paramString.size())
- {
- JSONObject localJSONObject = paramString.getJSONObject(i);
- AdPos localAdPos = new AdPos();
- localAdPos.posdesc = localJSONObject.getString("posdesc");
- localAdPos.posid = localJSONObject.getString("posid");
- localAdPos.posquery = localJSONObject.getString("posquery");
- localAdPos.parseDesc();
- localArrayList.add(localAdPos);
- i += 1;
- }
- paramString = new Result(true, localArrayList);
- return paramString;
- }
- }
- catch (Exception paramString)
- {
- }
- return null;
- }
- private Result parseAdvertisementInfo(String paramString)
- {
- if ((paramString != null) && (!paramString.equalsIgnoreCase("")));
- while (true)
- {
- int i;
- try
- {
- Object localObject1 = (JSONObject)JSON.parse(paramString);
- i = ((JSONObject)localObject1).getIntValue("errorno");
- paramString = new AdvertisementItemNode();
- if (i == 0)
- {
- localObject1 = ((JSONObject)localObject1).getJSONObject("data");
- paramString.id = ((JSONObject)localObject1).getString("id");
- paramString.image = ((JSONObject)localObject1).getString("image");
- paramString.resType = ((JSONObject)localObject1).getIntValue("restype");
- i = ((JSONObject)localObject1).getIntValue("size");
- paramString.width = (i / 10000);
- paramString.height = (i - paramString.width * 10000);
- paramString.audioPath = ((JSONObject)localObject1).getString("audio");
- paramString.duration = ((JSONObject)localObject1).getIntValue("duration");
- paramString.landing = ((JSONObject)localObject1).getString("landing");
- paramString.desc = ((JSONObject)localObject1).getString("subtitle");
- paramString.interval = ((JSONObject)localObject1).getIntValue("interval");
- paramString.splash_landing = ((JSONObject)localObject1).getString("splash_landing");
- paramString.skin = ((JSONObject)localObject1).getString("skin");
- paramString.useLocalWebview = ((JSONObject)localObject1).getBooleanValue("use_default_browser");
- if (paramString.useLocalWebview)
- break label511;
- bool = true;
- paramString.useLocalWebview = bool;
- paramString.internal_landing = ((JSONObject)localObject1).getString("internal_landing");
- Object localObject2;
- if ((paramString.internal_landing != null) && (!paramString.internal_landing.equalsIgnoreCase("")))
- {
- localObject2 = paramString.internal_landing.split("/");
- if ((localObject2 != null) && (localObject2.length >= 5))
- {
- paramString.internal_catid = Integer.valueOf(localObject2[1]).intValue();
- paramString.internal_channelid = Integer.valueOf(localObject2[2]).intValue();
- paramString.interval_programid = Integer.valueOf(localObject2[3]).intValue();
- paramString.interval_channeltype = Integer.valueOf(localObject2[4]).intValue();
- }
- }
- localObject1 = ((JSONObject)localObject1).getJSONArray("trackers");
- if (localObject1 != null)
- {
- paramString.mTracker.lstEventType = new ArrayList();
- paramString.mTracker.lstProvider = new ArrayList();
- paramString.mTracker.lstTrackerUrl = new ArrayList();
- i = 0;
- if (i < ((JSONArray)localObject1).size())
- {
- Object localObject3 = ((JSONArray)localObject1).getJSONObject(i);
- localObject2 = ((JSONObject)localObject3).getString("provider");
- String str = ((JSONObject)localObject3).getString("url");
- localObject3 = ((JSONObject)localObject3).getString("event_type");
- if ((localObject2 == null) || (str == null) || (localObject3 == null))
- break label502;
- paramString.mTracker.lstEventType.add(localObject3);
- paramString.mTracker.lstProvider.add(localObject2);
- paramString.mTracker.lstTrackerUrl.add(str);
- break label502;
- }
- }
- paramString = new Result(true, paramString);
- return paramString;
- }
- }
- catch (Exception paramString)
- {
- }
- return null;
- label502: i += 1;
- continue;
- label511: boolean bool = false;
- }
- }
- private Result parseAllChannels(String paramString)
- {
- if ((paramString != null) && (!paramString.equalsIgnoreCase("")));
- while (true)
- {
- int i;
- try
- {
- JSONObject localJSONObject = (JSONObject)JSON.parse(paramString);
- JSONArray localJSONArray = localJSONObject.getJSONArray("data");
- if (localJSONArray != null)
- {
- ArrayList localArrayList = new ArrayList();
- i = 0;
- paramString = null;
- if (i < localJSONArray.size())
- {
- ChannelNode localChannelNode = _parseChannelNode(localJSONArray.getJSONObject(i));
- if (localChannelNode == null)
- break label141;
- localArrayList.add(localChannelNode);
- localObject = localChannelNode;
- if (paramString == null)
- break label143;
- paramString.nextSibling = localChannelNode;
- localChannelNode.prevSibling = paramString;
- localObject = localChannelNode;
- break label143;
- }
- paramString = new Result(true, localArrayList, "total", String.valueOf(localJSONObject.getIntValue("total")));
- return paramString;
- }
- }
- catch (Exception paramString)
- {
- paramString.printStackTrace();
- }
- return null;
- label141: Object localObject = paramString;
- label143: i += 1;
- paramString = (String)localObject;
- }
- }
- private Result parseBillboardChannels(String paramString)
- {
- if ((paramString != null) && (!paramString.equalsIgnoreCase("")));
- while (true)
- {
- int i;
- try
- {
- paramString = ((JSONObject)JSON.parse(paramString)).getJSONArray("data");
- if (paramString != null)
- {
- ArrayList localArrayList = new ArrayList();
- i = 0;
- if (i < paramString.size())
- {
- JSONObject localJSONObject1 = paramString.getJSONObject(i);
- if (localJSONObject1 == null)
- break label186;
- BillboardItemNode localBillboardItemNode = new BillboardItemNode();
- JSONObject localJSONObject2 = localJSONObject1.getJSONObject("detail");
- if (localJSONObject2 != null)
- {
- ChannelNode localChannelNode = new ChannelNode();
- String str = localJSONObject2.getString("type");
- if ((str == null) || (!str.equalsIgnoreCase("channel_live")))
- break label186;
- localChannelNode.channelType = 0;
- localBillboardItemNode.setDetail(_parseChannelNode(localJSONObject2));
- }
- localBillboardItemNode.name = localJSONObject1.getString("titile");
- localBillboardItemNode.desc = localJSONObject1.getString("sub_title");
- localArrayList.add(localBillboardItemNode);
- break label186;
- }
- paramString = new Result(true, localArrayList);
- return paramString;
- }
- }
- catch (Exception paramString)
- {
- }
- return null;
- label186: i += 1;
- }
- }
- private Result parseBillboardProgram(String paramString)
- {
- if ((paramString != null) && (!paramString.equalsIgnoreCase("")))
- try
- {
- paramString = ((JSO…
Large files files are truncated, but you can click here to view the full file