PageRenderTime 65ms CodeModel.GetById 22ms RepoModel.GetById 1ms app.codeStats 0ms

/QingTingFanBianYi/src/fm/qingting/qtradio/parser/NetParser.java

https://gitlab.com/qt-prometheus/qt-prometheus
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

  1. package fm.qingting.qtradio.parser;
  2. import android.app.Activity;
  3. import android.util.Log;
  4. import com.alibaba.fastjson.JSON;
  5. import com.alibaba.fastjson.JSONArray;
  6. import com.alibaba.fastjson.JSONObject;
  7. import com.umeng.analytics.MobclickAgent;
  8. import fm.qingting.framework.data.DataParserImpl;
  9. import fm.qingting.framework.data.Result;
  10. import fm.qingting.qtradio.abtest.ABTest;
  11. import fm.qingting.qtradio.ad.AdConfig;
  12. import fm.qingting.qtradio.ad.AdPos;
  13. import fm.qingting.qtradio.ad.platforms.mediav.MediaVAgent;
  14. import fm.qingting.qtradio.helper.ChannelHelper;
  15. import fm.qingting.qtradio.im.info.GroupInfo;
  16. import fm.qingting.qtradio.im.message.IMMessage;
  17. import fm.qingting.qtradio.jd.data.CommodityInfo;
  18. import fm.qingting.qtradio.model.ActivityNode;
  19. import fm.qingting.qtradio.model.AdvertisementItemNode;
  20. import fm.qingting.qtradio.model.AdvertisementItemNode.AdTrackers;
  21. import fm.qingting.qtradio.model.Attribute;
  22. import fm.qingting.qtradio.model.Attributes;
  23. import fm.qingting.qtradio.model.BillboardItemNode;
  24. import fm.qingting.qtradio.model.BroadcasterNode;
  25. import fm.qingting.qtradio.model.CategoryNode;
  26. import fm.qingting.qtradio.model.ChannelNode;
  27. import fm.qingting.qtradio.model.GameBean;
  28. import fm.qingting.qtradio.model.H5Bean;
  29. import fm.qingting.qtradio.model.InfoManager;
  30. import fm.qingting.qtradio.model.MediaCenter;
  31. import fm.qingting.qtradio.model.Node;
  32. import fm.qingting.qtradio.model.PingInfoV6;
  33. import fm.qingting.qtradio.model.PlayHistoryNode;
  34. import fm.qingting.qtradio.model.ProgramABTestBean;
  35. import fm.qingting.qtradio.model.ProgramNode;
  36. import fm.qingting.qtradio.model.ProgramSchedule;
  37. import fm.qingting.qtradio.model.ProgramScheduleList;
  38. import fm.qingting.qtradio.model.ProgramTopicNode;
  39. import fm.qingting.qtradio.model.QTADLocation;
  40. import fm.qingting.qtradio.model.QTLocation;
  41. import fm.qingting.qtradio.model.RecommendCategoryNode;
  42. import fm.qingting.qtradio.model.RecommendItemNode;
  43. import fm.qingting.qtradio.model.RecommendPlayingItemNode;
  44. import fm.qingting.qtradio.model.SharedCfg;
  45. import fm.qingting.qtradio.model.SpecialTopicNode;
  46. import fm.qingting.qtradio.model.WemartBean;
  47. import fm.qingting.qtradio.room.AdminInfo;
  48. import fm.qingting.qtradio.room.SnsInfo;
  49. import fm.qingting.qtradio.room.UserInfo;
  50. import fm.qingting.qtradio.search.SearchHotKeyword;
  51. import fm.qingting.qtradio.search.SearchItemNode;
  52. import fm.qingting.qtradio.search.SearchNode.NewSearchComparator;
  53. import fm.qingting.qtradio.search.SearchNode.SearchResult;
  54. import fm.qingting.qtradio.social.MiniFavNode;
  55. import fm.qingting.qtradio.social.UserProfile;
  56. import fm.qingting.utils.AppInfo;
  57. import fm.qingting.utils.ThirdTracker;
  58. import fm.qingting.utils.TimeUtil;
  59. import fm.qingting.utils.UserDataUtil;
  60. import java.util.ArrayList;
  61. import java.util.Collections;
  62. import java.util.HashMap;
  63. import java.util.List;
  64. import java.util.Map;
  65. public class NetParser extends DataParserImpl
  66. {
  67. private ActivityNode _parseActivity(JSONObject paramJSONObject)
  68. {
  69. if (paramJSONObject != null)
  70. try
  71. {
  72. ActivityNode localActivityNode = new ActivityNode();
  73. localActivityNode.id = paramJSONObject.getIntValue("id");
  74. localActivityNode.name = paramJSONObject.getString("title");
  75. localActivityNode.type = paramJSONObject.getString("type");
  76. localActivityNode.contentUrl = paramJSONObject.getString("url");
  77. localActivityNode.infoUrl = null;
  78. localActivityNode.infoTitle = paramJSONObject.getString("description");
  79. return localActivityNode;
  80. }
  81. catch (Exception paramJSONObject)
  82. {
  83. return null;
  84. }
  85. return null;
  86. }
  87. private AdminInfo _parseAdminInfo(JSONObject paramJSONObject)
  88. {
  89. if (paramJSONObject != null)
  90. try
  91. {
  92. AdminInfo localAdminInfo = new AdminInfo();
  93. localAdminInfo.userKey = paramJSONObject.getString("userid");
  94. localAdminInfo.snsInfo.sns_avatar = paramJSONObject.getString("avatar");
  95. localAdminInfo.snsInfo.sns_name = paramJSONObject.getString("username");
  96. if (localAdminInfo.snsInfo.sns_name == null)
  97. localAdminInfo.snsInfo.sns_name = "蜻蜓管理员";
  98. localAdminInfo.snsInfo.signature = paramJSONObject.getString("signature");
  99. localAdminInfo.snsInfo.age = paramJSONObject.getIntValue("age");
  100. localAdminInfo.snsInfo.sns_gender = paramJSONObject.getString("gender");
  101. String str = paramJSONObject.getString("is_blocked");
  102. localAdminInfo.weiboName = paramJSONObject.getString("weiboname");
  103. if ((str != null) && (!str.equalsIgnoreCase("")))
  104. if (Integer.valueOf(str).intValue() != 0)
  105. break label188;
  106. label188: for (localAdminInfo.isBlocked = false; ; localAdminInfo.isBlocked = true)
  107. {
  108. str = paramJSONObject.getString("level");
  109. paramJSONObject = localAdminInfo;
  110. if (str == null)
  111. break;
  112. paramJSONObject = localAdminInfo;
  113. if (str.equalsIgnoreCase(""))
  114. break;
  115. localAdminInfo.level = Integer.valueOf(str).intValue();
  116. return localAdminInfo;
  117. }
  118. }
  119. catch (Exception paramJSONObject)
  120. {
  121. }
  122. else
  123. paramJSONObject = null;
  124. return paramJSONObject;
  125. }
  126. private ChannelNode _parseChannelNode(JSONObject paramJSONObject)
  127. {
  128. int j = 0;
  129. if (paramJSONObject != null)
  130. try
  131. {
  132. ChannelNode localChannelNode = new ChannelNode();
  133. if (paramJSONObject.containsKey("channel_star"))
  134. {
  135. localChannelNode.ratingStar = paramJSONObject.getIntValue("channel_star");
  136. localChannelNode.channelId = paramJSONObject.getIntValue("id");
  137. localChannelNode.title = paramJSONObject.getString("title");
  138. localChannelNode.desc = paramJSONObject.getString("description");
  139. localChannelNode.groupId = paramJSONObject.getIntValue("chatgroup_id");
  140. localChannelNode.categoryId = paramJSONObject.getIntValue("category_id");
  141. localChannelNode.update_time = paramJSONObject.getString("update_time");
  142. localObject = paramJSONObject.getJSONObject("thumbs");
  143. if (localObject != null)
  144. {
  145. localChannelNode.setSmallThumb(((JSONObject)localObject).getString("200_thumb"));
  146. localChannelNode.setMediumThumb(((JSONObject)localObject).getString("400_thumb"));
  147. localChannelNode.setLargeThumb(((JSONObject)localObject).getString("800_thumb"));
  148. if (localChannelNode.noThumb())
  149. {
  150. localChannelNode.setSmallThumb(((JSONObject)localObject).getString("small_thumb"));
  151. localChannelNode.setMediumThumb(((JSONObject)localObject).getString("medium_thumb"));
  152. localChannelNode.setLargeThumb(((JSONObject)localObject).getString("large_thumb"));
  153. }
  154. }
  155. localObject = paramJSONObject.getString("type");
  156. if ((localObject == null) || (!((String)localObject).equalsIgnoreCase("channel_ondemand")))
  157. break label384;
  158. localChannelNode.channelType = 1;
  159. label197: if (paramJSONObject.getIntValue("auto_play") != 0)
  160. break label392;
  161. localChannelNode.autoPlay = false;
  162. label211: if (paramJSONObject.getIntValue("record_enabled") != 0)
  163. break label400;
  164. localChannelNode.recordEnable = false;
  165. label225: if (!localChannelNode.isLiveChannel())
  166. break label408;
  167. localChannelNode.audienceCnt = paramJSONObject.getIntValue("audience_count");
  168. localObject = paramJSONObject.getJSONObject("mediainfo");
  169. if (localObject != null)
  170. localChannelNode.resId = ((JSONObject)localObject).getIntValue("id");
  171. }
  172. BroadcasterNode localBroadcasterNode;
  173. while (true)
  174. {
  175. localObject = paramJSONObject.getJSONObject("detail");
  176. paramJSONObject = localChannelNode;
  177. if (localObject == null)
  178. break label582;
  179. localChannelNode.programCnt = ((JSONObject)localObject).getIntValue("program_count");
  180. paramJSONObject = ((JSONObject)localObject).getJSONArray("authors");
  181. if (paramJSONObject == null)
  182. break label422;
  183. i = 0;
  184. while (i < paramJSONObject.size())
  185. {
  186. localBroadcasterNode = parseBroadcasterNode(paramJSONObject.getJSONObject(i));
  187. if (localChannelNode.lstAuthors == null)
  188. localChannelNode.lstAuthors = new ArrayList();
  189. localChannelNode.lstAuthors.add(localBroadcasterNode);
  190. i += 1;
  191. }
  192. if (!paramJSONObject.containsKey("star"))
  193. break;
  194. localChannelNode.ratingStar = paramJSONObject.getIntValue("star");
  195. break;
  196. label384: localChannelNode.channelType = 0;
  197. break label197;
  198. label392: localChannelNode.autoPlay = true;
  199. break label211;
  200. label400: localChannelNode.recordEnable = true;
  201. break label225;
  202. label408: localChannelNode.latest_program = paramJSONObject.getString("latest_program");
  203. }
  204. label422: paramJSONObject = ((JSONObject)localObject).getJSONArray("broadcasters");
  205. if (paramJSONObject != null)
  206. {
  207. i = 0;
  208. while (i < paramJSONObject.size())
  209. {
  210. localBroadcasterNode = parseBroadcasterNode(paramJSONObject.getJSONObject(i));
  211. if (localChannelNode.lstBroadcaster == null)
  212. localChannelNode.lstBroadcaster = new ArrayList();
  213. localChannelNode.lstBroadcaster.add(localBroadcasterNode);
  214. i += 1;
  215. }
  216. }
  217. Object localObject = ((JSONObject)localObject).getJSONArray("podcasters");
  218. paramJSONObject = localChannelNode;
  219. if (localObject == null)
  220. break label582;
  221. int i = j;
  222. while (true)
  223. {
  224. paramJSONObject = localChannelNode;
  225. if (i >= ((JSONArray)localObject).size())
  226. break;
  227. paramJSONObject = _parsePodcaster(((JSONArray)localObject).getJSONObject(i));
  228. if (localChannelNode.lstPodcasters == null)
  229. localChannelNode.lstPodcasters = new ArrayList();
  230. if (paramJSONObject != null)
  231. localChannelNode.lstPodcasters.add(paramJSONObject);
  232. i += 1;
  233. }
  234. }
  235. catch (Exception paramJSONObject)
  236. {
  237. }
  238. else
  239. paramJSONObject = null;
  240. label582: return paramJSONObject;
  241. }
  242. private ProgramNode _parseLiveProgramNode(JSONObject paramJSONObject, int paramInt)
  243. {
  244. int i = 0;
  245. if (paramJSONObject != null)
  246. {
  247. ProgramNode localProgramNode = new ProgramNode();
  248. localProgramNode.id = paramJSONObject.getIntValue("id");
  249. localProgramNode.startTime = paramJSONObject.getString("start_time");
  250. localProgramNode.endTime = paramJSONObject.getString("end_time");
  251. if ((paramInt != 0) || ((localProgramNode.endTime != null) && (localProgramNode.endTime.equalsIgnoreCase("00:00:00"))))
  252. localProgramNode.endTime = "23:59:00";
  253. localProgramNode.title = paramJSONObject.getString("title");
  254. localProgramNode.channelId = paramJSONObject.getIntValue("channel_id");
  255. localProgramNode.uniqueId = paramJSONObject.getIntValue("program_id");
  256. localProgramNode.groupId = paramJSONObject.getIntValue("chatgroup_id");
  257. localProgramNode.dayOfWeek = paramInt;
  258. localProgramNode.channelType = 0;
  259. Object localObject = paramJSONObject.getJSONObject("mediainfo");
  260. if (localObject != null)
  261. localProgramNode.resId = ((JSONObject)localObject).getIntValue("id");
  262. localObject = InfoManager.getInstance().getProgramABTest(localProgramNode.channelId, localProgramNode.uniqueId);
  263. if (localObject != null)
  264. {
  265. localProgramNode.resId = ((ProgramABTestBean)localObject).resId;
  266. localProgramNode.title = ((ProgramABTestBean)localObject).title;
  267. }
  268. paramJSONObject = paramJSONObject.getJSONObject("detail");
  269. if (paramJSONObject != null)
  270. {
  271. paramJSONObject = paramJSONObject.getJSONArray("broadcasters");
  272. if (paramJSONObject != null)
  273. {
  274. localProgramNode.lstBroadcaster = new ArrayList();
  275. paramInt = i;
  276. while (paramInt < paramJSONObject.size())
  277. {
  278. localObject = new BroadcasterNode();
  279. JSONObject localJSONObject = paramJSONObject.getJSONObject(paramInt);
  280. ((BroadcasterNode)localObject).id = localJSONObject.getIntValue("id");
  281. ((BroadcasterNode)localObject).nick = localJSONObject.getString("username");
  282. ((BroadcasterNode)localObject).avatar = localJSONObject.getString("thumb");
  283. ((BroadcasterNode)localObject).weiboId = localJSONObject.getString("weibo_id");
  284. ((BroadcasterNode)localObject).weiboName = localJSONObject.getString("weibo_name");
  285. ((BroadcasterNode)localObject).qqId = localJSONObject.getString("qq_id");
  286. ((BroadcasterNode)localObject).qqName = localJSONObject.getString("qq_name");
  287. localProgramNode.lstBroadcaster.add(localObject);
  288. paramInt += 1;
  289. }
  290. }
  291. }
  292. return localProgramNode;
  293. }
  294. return null;
  295. }
  296. private List<PingInfoV6> _parseMediaCenter(JSONObject paramJSONObject, int paramInt)
  297. {
  298. int i = 0;
  299. if (paramJSONObject != null)
  300. try
  301. {
  302. JSONArray localJSONArray = paramJSONObject.getJSONArray("mediacenters");
  303. double d = paramJSONObject.getDoubleValue("preference_change_cost");
  304. if (localJSONArray != null)
  305. {
  306. ArrayList localArrayList = new ArrayList();
  307. paramJSONObject = localArrayList;
  308. if (i >= localJSONArray.size())
  309. break label233;
  310. Object localObject = localJSONArray.getJSONObject(i);
  311. paramJSONObject = new PingInfoV6();
  312. paramJSONObject.domain = ((JSONObject)localObject).getString("domain");
  313. paramJSONObject.backupIP = ((JSONObject)localObject).getString("backup_ips");
  314. paramJSONObject.weight = ((JSONObject)localObject).getIntValue("weight");
  315. paramJSONObject.testpath = ((JSONObject)localObject).getString("test_path");
  316. paramJSONObject.accessExp = ((JSONObject)localObject).getString("access");
  317. paramJSONObject.replayExp = ((JSONObject)localObject).getString("replay");
  318. paramJSONObject.res = ((JSONObject)localObject).getString("result");
  319. paramJSONObject.codename = ((JSONObject)localObject).getString("codename");
  320. paramJSONObject.channelType = paramInt;
  321. paramJSONObject.pcc = d;
  322. localObject = ((JSONObject)localObject).getString("type");
  323. if ((localObject != null) && (((String)localObject).equalsIgnoreCase("cdn")));
  324. for (paramJSONObject.isCDN = true; ; paramJSONObject.isCDN = false)
  325. {
  326. localArrayList.add(paramJSONObject);
  327. i += 1;
  328. break;
  329. }
  330. }
  331. }
  332. catch (Exception paramJSONObject)
  333. {
  334. }
  335. else
  336. paramJSONObject = null;
  337. label233: return paramJSONObject;
  338. }
  339. private List<RecommendItemNode> _parseNewRecommendV2Banner(JSONObject paramJSONObject, List<RecommendItemNode> paramList)
  340. {
  341. if ((paramJSONObject != null) && (paramList != null))
  342. {
  343. JSONArray localJSONArray = paramJSONObject.getJSONArray("data");
  344. int i = 0;
  345. while (true)
  346. {
  347. paramJSONObject = paramList;
  348. if (i >= localJSONArray.size())
  349. break;
  350. paramJSONObject = _parseRecommendNode(localJSONArray.getJSONObject(i));
  351. if (paramJSONObject != null)
  352. paramList.add(paramJSONObject);
  353. i += 1;
  354. }
  355. }
  356. paramJSONObject = null;
  357. return paramJSONObject;
  358. }
  359. private UserInfo _parsePodcaster(JSONObject paramJSONObject)
  360. {
  361. if (paramJSONObject != null)
  362. {
  363. UserInfo localUserInfo = new UserInfo();
  364. localUserInfo.userId = paramJSONObject.getString("user_system_id");
  365. localUserInfo.userKey = localUserInfo.userId;
  366. localUserInfo.isBlocked = false;
  367. localUserInfo.isPodcaster = true;
  368. localUserInfo.podcasterId = paramJSONObject.getIntValue("id");
  369. localUserInfo.podcasterName = paramJSONObject.getString("nickname");
  370. localUserInfo.fansNumber = paramJSONObject.getLong("fan_num").longValue();
  371. localUserInfo.snsInfo.signature = paramJSONObject.getString("signature");
  372. localUserInfo.snsInfo.sns_id = paramJSONObject.getString("weibo_id");
  373. localUserInfo.snsInfo.sns_name = paramJSONObject.getString("weibo_name");
  374. if (localUserInfo.snsInfo.sns_name == null)
  375. localUserInfo.snsInfo.sns_name = "蜻蜓主播";
  376. localUserInfo.snsInfo.sns_avatar = paramJSONObject.getString("avatar");
  377. localUserInfo.snsInfo.desc = paramJSONObject.getString("description");
  378. int i = paramJSONObject.getIntValue("sex");
  379. if (i == 0)
  380. localUserInfo.snsInfo.sns_gender = "n";
  381. do
  382. {
  383. return localUserInfo;
  384. if (i == 1)
  385. {
  386. localUserInfo.snsInfo.sns_gender = "m";
  387. return localUserInfo;
  388. }
  389. }
  390. while (i != 2);
  391. localUserInfo.snsInfo.sns_gender = "f";
  392. return localUserInfo;
  393. }
  394. return null;
  395. }
  396. private UserInfo _parsePodcasterNew(JSONObject paramJSONObject)
  397. {
  398. boolean bool = true;
  399. if (paramJSONObject != null)
  400. {
  401. UserInfo localUserInfo = new UserInfo();
  402. localUserInfo.userId = paramJSONObject.getString("userid");
  403. localUserInfo.userKey = localUserInfo.userId;
  404. localUserInfo.isPodcaster = true;
  405. localUserInfo.podcasterId = paramJSONObject.getIntValue("pid");
  406. localUserInfo.podcasterName = paramJSONObject.getString("username");
  407. localUserInfo.fansNumber = paramJSONObject.getLong("fan_num").longValue();
  408. localUserInfo.snsInfo.signature = paramJSONObject.getString("signature");
  409. localUserInfo.snsInfo.sns_id = paramJSONObject.getString("weibo_id");
  410. localUserInfo.snsInfo.sns_name = paramJSONObject.getString("weibo_name");
  411. if (localUserInfo.snsInfo.sns_name == null)
  412. localUserInfo.snsInfo.sns_name = "蜻蜓主播";
  413. localUserInfo.snsInfo.sns_avatar = paramJSONObject.getString("avatar");
  414. localUserInfo.snsInfo.desc = paramJSONObject.getString("description");
  415. int i = paramJSONObject.getIntValue("gender");
  416. if (i == 0)
  417. {
  418. localUserInfo.snsInfo.sns_gender = "n";
  419. if (paramJSONObject.getInteger("is_blocked").intValue() != 1)
  420. break label238;
  421. }
  422. while (true)
  423. {
  424. localUserInfo.isBlocked = bool;
  425. return localUserInfo;
  426. if (i == 1)
  427. {
  428. localUserInfo.snsInfo.sns_gender = "m";
  429. break;
  430. }
  431. if (i != 2)
  432. break;
  433. localUserInfo.snsInfo.sns_gender = "f";
  434. break;
  435. label238: bool = false;
  436. }
  437. }
  438. return null;
  439. }
  440. private ProgramNode _parseProgramTempNode(JSONObject paramJSONObject)
  441. {
  442. if (paramJSONObject != null)
  443. try
  444. {
  445. ProgramNode localProgramNode = new ProgramNode();
  446. localProgramNode.mLiveInVirtual = true;
  447. localProgramNode.dayOfWeek = 0;
  448. localProgramNode.id = paramJSONObject.getIntValue("id");
  449. localProgramNode.uniqueId = localProgramNode.id;
  450. localProgramNode.channelType = 0;
  451. localProgramNode.title = paramJSONObject.getString("title");
  452. localProgramNode.duration = paramJSONObject.getDoubleValue("duration");
  453. localProgramNode.sequence = paramJSONObject.getIntValue("sequence");
  454. localProgramNode.startTime = paramJSONObject.getString("start_time");
  455. long l = TimeUtil.dateToMS(localProgramNode.startTime);
  456. localProgramNode.startTime = TimeUtil.msToDate3(l);
  457. localProgramNode.setAbsoluteStartTime(l / 1000L);
  458. localProgramNode.endTime = paramJSONObject.getString("end_time");
  459. l = TimeUtil.dateToMS(localProgramNode.endTime);
  460. localProgramNode.endTime = TimeUtil.msToDate3(l);
  461. localProgramNode.setAbsoluteEndTime(l / 1000L);
  462. localProgramNode.sequence = paramJSONObject.getIntValue("sequence");
  463. localProgramNode.groupId = paramJSONObject.getIntValue("chatgroup_id");
  464. paramJSONObject = paramJSONObject.getJSONObject("mediainfo");
  465. if (paramJSONObject != null)
  466. localProgramNode.resId = paramJSONObject.getIntValue("id");
  467. return localProgramNode;
  468. }
  469. catch (Exception paramJSONObject)
  470. {
  471. }
  472. return null;
  473. }
  474. private RecommendItemNode _parseRecommendItemNode(JSONObject paramJSONObject, boolean paramBoolean)
  475. {
  476. Object localObject2 = null;
  477. Object localObject1 = localObject2;
  478. if (paramJSONObject != null);
  479. try
  480. {
  481. RecommendItemNode localRecommendItemNode = new RecommendItemNode();
  482. localRecommendItemNode.name = paramJSONObject.getString("title");
  483. JSONObject localJSONObject1;
  484. JSONObject localJSONObject2;
  485. int k;
  486. if (!paramBoolean)
  487. {
  488. localJSONObject1 = paramJSONObject.getJSONObject("thumbs");
  489. if (localJSONObject1 != null)
  490. {
  491. localRecommendItemNode.setSmallThumb(localJSONObject1.getString("200_thumb"));
  492. localRecommendItemNode.setMediumThumb(localJSONObject1.getString("400_thumb"));
  493. localRecommendItemNode.setLargeThumb(localJSONObject1.getString("800_thumb"));
  494. }
  495. if (localRecommendItemNode.noThumb())
  496. localRecommendItemNode.setSmallThumb(paramJSONObject.getString("thumb"));
  497. localRecommendItemNode.update_time = paramJSONObject.getString("update_time");
  498. localJSONObject2 = paramJSONObject.getJSONObject("detail");
  499. if (localJSONObject2 == null)
  500. break label667;
  501. if (!localJSONObject2.containsKey("channel_star"))
  502. break label332;
  503. localRecommendItemNode.ratingStar = localJSONObject2.getIntValue("channel_star");
  504. k = 1;
  505. }
  506. while (true)
  507. {
  508. label148: localJSONObject1 = paramJSONObject.getJSONObject("parent_info");
  509. int i;
  510. int j;
  511. label211: int m;
  512. if (localJSONObject1 != null)
  513. {
  514. paramJSONObject = localJSONObject1.getString("parent_type");
  515. if (paramJSONObject != null)
  516. if ((paramJSONObject.equalsIgnoreCase("channel")) || (paramJSONObject.equalsIgnoreCase("channel_ondemand")))
  517. {
  518. i = localJSONObject1.getIntValue("parent_id");
  519. paramJSONObject = localJSONObject1.getString("parent_name");
  520. j = 0;
  521. localObject1 = localJSONObject1.getJSONObject("parent_extra");
  522. localJSONObject1 = paramJSONObject;
  523. m = i;
  524. if (localObject1 != null)
  525. {
  526. j = ((JSONObject)localObject1).getIntValue("category_id");
  527. localRecommendItemNode.mCategoryId = j;
  528. m = i;
  529. }
  530. }
  531. }
  532. for (localJSONObject1 = paramJSONObject; ; localJSONObject1 = null)
  533. {
  534. paramJSONObject = localJSONObject2.getString("type");
  535. if (paramJSONObject.equalsIgnoreCase("program_ondemand"))
  536. {
  537. paramJSONObject = _parseVirtualProgramNode(localJSONObject2, 0);
  538. paramJSONObject.channelId = m;
  539. if (localJSONObject1 != null)
  540. paramJSONObject.setChannelName(localJSONObject1);
  541. if (k != 0)
  542. paramJSONObject.channelRatingStar = localRecommendItemNode.ratingStar;
  543. localRecommendItemNode.setDetail(paramJSONObject);
  544. break label667;
  545. localRecommendItemNode.setSmallThumb(paramJSONObject.getString("thumb"));
  546. break;
  547. label332: if (!localJSONObject2.containsKey("star"))
  548. break label661;
  549. localRecommendItemNode.ratingStar = localJSONObject2.getIntValue("star");
  550. k = 1;
  551. break label148;
  552. if (!paramJSONObject.equalsIgnoreCase("category"))
  553. break label639;
  554. j = localJSONObject1.getIntValue("parent_id");
  555. i = 0;
  556. paramJSONObject = null;
  557. break label211;
  558. }
  559. if (paramJSONObject.equalsIgnoreCase("channel_ondemand"))
  560. {
  561. paramJSONObject = _parseChannelNode(localJSONObject2);
  562. paramJSONObject.categoryId = j;
  563. if (k != 0)
  564. paramJSONObject.ratingStar = localRecommendItemNode.ratingStar;
  565. localRecommendItemNode.setDetail(paramJSONObject);
  566. break label667;
  567. }
  568. if (paramJSONObject.equalsIgnoreCase("channel_live"))
  569. {
  570. paramJSONObject = _parseChannelNode(localJSONObject2);
  571. paramJSONObject.categoryId = j;
  572. if (k != 0)
  573. paramJSONObject.ratingStar = localRecommendItemNode.ratingStar;
  574. localRecommendItemNode.setDetail(paramJSONObject);
  575. break label667;
  576. }
  577. if (paramJSONObject.equalsIgnoreCase("topic"))
  578. {
  579. paramJSONObject = _parseSpecialTopicNode(localJSONObject2);
  580. if (paramJSONObject != null)
  581. {
  582. localRecommendItemNode.mCategoryId = paramJSONObject.categoryId;
  583. if (k != 0)
  584. paramJSONObject.channelStar = localRecommendItemNode.ratingStar;
  585. localRecommendItemNode.setDetail(paramJSONObject);
  586. }
  587. if (k == 0)
  588. break label667;
  589. paramJSONObject.channelStar = localRecommendItemNode.ratingStar;
  590. break label667;
  591. }
  592. if (paramJSONObject.equalsIgnoreCase("activity"))
  593. {
  594. localRecommendItemNode.setDetail(_parseActivity(localJSONObject2));
  595. break label667;
  596. }
  597. localObject1 = localObject2;
  598. if (!paramJSONObject.equalsIgnoreCase("program_temp"))
  599. break label671;
  600. paramJSONObject = _parseProgramTempNode(localJSONObject2);
  601. if (paramJSONObject != null)
  602. {
  603. paramJSONObject.mLiveInVirtual = true;
  604. paramJSONObject.channelId = m;
  605. if (localJSONObject1 != null)
  606. paramJSONObject.setChannelName(localJSONObject1);
  607. localRecommendItemNode.setDetail(paramJSONObject);
  608. }
  609. if (k == 0)
  610. break label667;
  611. paramJSONObject.channelRatingStar = localRecommendItemNode.ratingStar;
  612. break label667;
  613. label639: j = 0;
  614. i = 0;
  615. paramJSONObject = null;
  616. break label211;
  617. j = 0;
  618. m = 0;
  619. }
  620. label661: k = 0;
  621. }
  622. label667: localObject1 = localRecommendItemNode;
  623. label671: return localObject1;
  624. }
  625. catch (Exception paramJSONObject)
  626. {
  627. }
  628. return null;
  629. }
  630. private RecommendItemNode _parseRecommendNode(JSONObject paramJSONObject)
  631. {
  632. return null;
  633. }
  634. private RecommendPlayingItemNode _parseRecommendPlayingProgram(JSONObject paramJSONObject)
  635. {
  636. if (paramJSONObject != null)
  637. try
  638. {
  639. JSONObject localJSONObject = paramJSONObject.getJSONObject("detail");
  640. if (localJSONObject == null)
  641. return null;
  642. RecommendPlayingItemNode localRecommendPlayingItemNode = new RecommendPlayingItemNode();
  643. localRecommendPlayingItemNode.channelName = paramJSONObject.getString("sub_title");
  644. localRecommendPlayingItemNode.programName = paramJSONObject.getString("title");
  645. localRecommendPlayingItemNode.thumb = paramJSONObject.getString("thumb");
  646. if (paramJSONObject.containsKey("channel_star"))
  647. localRecommendPlayingItemNode.ratingStar = paramJSONObject.getIntValue("channel_star");
  648. if (localJSONObject.containsKey("channel_star"))
  649. localRecommendPlayingItemNode.ratingStar = localJSONObject.getIntValue("channel_star");
  650. paramJSONObject = localJSONObject.getJSONObject("mediainfo");
  651. if (paramJSONObject != null)
  652. localRecommendPlayingItemNode.resId = paramJSONObject.getIntValue("id");
  653. localRecommendPlayingItemNode.channelId = localJSONObject.getIntValue("channel_id");
  654. localRecommendPlayingItemNode.programid = localJSONObject.getIntValue("id");
  655. localRecommendPlayingItemNode.startTime = localJSONObject.getString("start_time");
  656. if ((localRecommendPlayingItemNode.startTime != null) && (localRecommendPlayingItemNode.startTime.equalsIgnoreCase("00:00:00")))
  657. localRecommendPlayingItemNode.startTime = "00:00:01";
  658. localRecommendPlayingItemNode.endTime = localJSONObject.getString("end_time");
  659. if ((localRecommendPlayingItemNode.endTime != null) && (localRecommendPlayingItemNode.endTime.equalsIgnoreCase("00:00:00")))
  660. localRecommendPlayingItemNode.endTime = "23:59:59";
  661. return localRecommendPlayingItemNode;
  662. }
  663. catch (Exception paramJSONObject)
  664. {
  665. }
  666. return null;
  667. }
  668. private SpecialTopicNode _parseSpecialTopicNode(JSONObject paramJSONObject)
  669. {
  670. if (paramJSONObject != null)
  671. try
  672. {
  673. SpecialTopicNode localSpecialTopicNode = new SpecialTopicNode();
  674. localSpecialTopicNode.id = (paramJSONObject.getIntValue("id") + 1000001);
  675. localSpecialTopicNode.title = paramJSONObject.getString("title");
  676. localSpecialTopicNode.thumb = paramJSONObject.getString("thumb");
  677. localSpecialTopicNode.desc = paramJSONObject.getString("description");
  678. localSpecialTopicNode.categoryId = paramJSONObject.getIntValue("category_id");
  679. localSpecialTopicNode.create_time = paramJSONObject.getString("create_time");
  680. localSpecialTopicNode.update_time = paramJSONObject.getString("update_time");
  681. return localSpecialTopicNode;
  682. }
  683. catch (Exception paramJSONObject)
  684. {
  685. }
  686. return null;
  687. }
  688. private UserInfo _parseUserInfo(JSONObject paramJSONObject)
  689. {
  690. if (paramJSONObject != null)
  691. try
  692. {
  693. UserInfo localUserInfo = new UserInfo();
  694. localUserInfo.userKey = paramJSONObject.getString("userId");
  695. localUserInfo.snsInfo.sns_avatar = paramJSONObject.getString("avatar");
  696. localUserInfo.snsInfo.sns_name = paramJSONObject.getString("userName");
  697. if (localUserInfo.snsInfo.sns_name == null)
  698. localUserInfo.snsInfo.sns_name = "蜻蜓用户";
  699. localUserInfo.snsInfo.signature = paramJSONObject.getString("signature");
  700. localUserInfo.snsInfo.age = paramJSONObject.getIntValue("age");
  701. localUserInfo.snsInfo.sns_gender = paramJSONObject.getString("gender");
  702. String str = paramJSONObject.getString("is_blocked");
  703. if ((str != null) && (!str.equalsIgnoreCase("")))
  704. if (Integer.valueOf(str).intValue() != 0)
  705. break label181;
  706. label181: for (localUserInfo.isBlocked = false; ; localUserInfo.isBlocked = true)
  707. {
  708. str = paramJSONObject.getString("level");
  709. paramJSONObject = localUserInfo;
  710. if (str == null)
  711. break;
  712. paramJSONObject = localUserInfo;
  713. if (str.equalsIgnoreCase(""))
  714. break;
  715. localUserInfo.level = Integer.valueOf(str).intValue();
  716. return localUserInfo;
  717. }
  718. }
  719. catch (Exception paramJSONObject)
  720. {
  721. }
  722. else
  723. paramJSONObject = null;
  724. return paramJSONObject;
  725. }
  726. private ProgramNode _parseVirtualProgramNode(JSONObject paramJSONObject, int paramInt)
  727. {
  728. Object localObject2 = null;
  729. Object localObject1 = localObject2;
  730. String str;
  731. if (paramJSONObject != null)
  732. {
  733. str = paramJSONObject.getString("type");
  734. if ((str == null) || (str.equalsIgnoreCase("program_ondemand")))
  735. break label56;
  736. localObject1 = localObject2;
  737. if (str.equalsIgnoreCase("program_temp"))
  738. localObject1 = _parseProgramTempNode(paramJSONObject);
  739. }
  740. return localObject1;
  741. label56: localObject1 = new ProgramNode();
  742. ((ProgramNode)localObject1).id = paramJSONObject.getIntValue("id");
  743. ((ProgramNode)localObject1).uniqueId = ((ProgramNode)localObject1).id;
  744. ((ProgramNode)localObject1).channelType = 1;
  745. ((ProgramNode)localObject1).title = paramJSONObject.getString("title");
  746. ((ProgramNode)localObject1).duration = paramJSONObject.getDoubleValue("duration");
  747. ((ProgramNode)localObject1).sequence = paramJSONObject.getIntValue("sequence");
  748. ((ProgramNode)localObject1).createTime = paramJSONObject.getString("create_time");
  749. ((ProgramNode)localObject1).updateTime = paramJSONObject.getString("update_time");
  750. ((ProgramNode)localObject1).sequence = paramJSONObject.getIntValue("sequence");
  751. ((ProgramNode)localObject1).groupId = paramJSONObject.getIntValue("chatgroup_id");
  752. paramJSONObject = paramJSONObject.getJSONObject("mediainfo");
  753. if (paramJSONObject != null)
  754. {
  755. ((ProgramNode)localObject1).resId = paramJSONObject.getIntValue("id");
  756. paramJSONObject = paramJSONObject.getJSONArray("bitrates_url");
  757. if (paramJSONObject != null)
  758. {
  759. ((ProgramNode)localObject1).lstAudioPath = new ArrayList();
  760. ((ProgramNode)localObject1).lstBitrate = new ArrayList();
  761. paramInt = 0;
  762. while (paramInt < paramJSONObject.size())
  763. {
  764. localObject2 = paramJSONObject.getJSONObject(paramInt);
  765. if (localObject2 != null)
  766. {
  767. str = ((JSONObject)localObject2).getString("file_path");
  768. if (str != null)
  769. ((ProgramNode)localObject1).lstAudioPath.add(str);
  770. localObject2 = Integer.valueOf(((JSONObject)localObject2).getIntValue("bitrate"));
  771. if (localObject2 != null)
  772. ((ProgramNode)localObject1).lstBitrate.add(localObject2);
  773. }
  774. paramInt += 1;
  775. }
  776. }
  777. }
  778. return localObject1;
  779. }
  780. private Result parseADConfig(String paramString)
  781. {
  782. if ((paramString != null) && (!paramString.equalsIgnoreCase("")));
  783. while (true)
  784. {
  785. int i;
  786. try
  787. {
  788. Object localObject1 = ((JSONObject)JSON.parse(paramString)).getJSONArray("data");
  789. if (localObject1 != null)
  790. {
  791. ArrayList localArrayList = new ArrayList();
  792. i = 0;
  793. if (i < ((JSONArray)localObject1).size())
  794. {
  795. Object localObject2 = ((JSONArray)localObject1).getJSONObject(i);
  796. if (localObject2 == null)
  797. break label300;
  798. String str1 = ((JSONObject)localObject2).getString("name");
  799. String str2 = ((JSONObject)localObject2).getString("url");
  800. int k = ((JSONObject)localObject2).getIntValue("percent");
  801. localObject2 = ((JSONObject)localObject2).getString("region");
  802. AdConfig localAdConfig = new AdConfig();
  803. localAdConfig.name = str1;
  804. localAdConfig.url = str2;
  805. localAdConfig.percent = k;
  806. localAdConfig.mRegions = ((String)localObject2);
  807. localArrayList.add(localAdConfig);
  808. if (localAdConfig.percent <= 1000)
  809. break label300;
  810. int m = localAdConfig.percent / 1000;
  811. int j = 0;
  812. if (j >= m - 1)
  813. break label300;
  814. localAdConfig = new AdConfig();
  815. localAdConfig.name = str1;
  816. localAdConfig.url = str2;
  817. localAdConfig.percent = k;
  818. localAdConfig.mRegions = ((String)localObject2);
  819. localArrayList.add(localAdConfig);
  820. j += 1;
  821. continue;
  822. }
  823. MobclickAgent.onEvent(InfoManager.getInstance().getContext(), "parseADConfig", "succ");
  824. localObject1 = new Result(true, localArrayList);
  825. return localObject1;
  826. }
  827. }
  828. catch (Exception localException)
  829. {
  830. }
  831. MobclickAgent.onEvent(InfoManager.getInstance().getContext(), "parseADConfig", "f:" + paramString);
  832. return null;
  833. label300: i += 1;
  834. }
  835. }
  836. private Result parseADLocation(String paramString)
  837. {
  838. if ((paramString != null) && (!paramString.equalsIgnoreCase("")))
  839. try
  840. {
  841. paramString = ((JSONObject)JSON.parse(paramString)).getJSONObject("data");
  842. if ((paramString != null) && (paramString.getIntValue("errorno") == 0))
  843. {
  844. QTADLocation localQTADLocation = new QTADLocation();
  845. localQTADLocation.city = paramString.getString("city");
  846. localQTADLocation.regionCode = paramString.getString("region");
  847. localQTADLocation.school = paramString.getString("school");
  848. localQTADLocation.ip = paramString.getString("real_ip");
  849. paramString = new Result(true, localQTADLocation);
  850. return paramString;
  851. }
  852. }
  853. catch (Exception paramString)
  854. {
  855. }
  856. return null;
  857. }
  858. private Result parseADVFromAirWave(String paramString)
  859. {
  860. int j = 0;
  861. if ((paramString != null) && (!paramString.equalsIgnoreCase("")))
  862. try
  863. {
  864. Object localObject2 = ((JSONObject)JSON.parse(paramString)).getJSONObject("0A89BCB4E85400C4");
  865. if (localObject2 != null)
  866. {
  867. if (((JSONObject)localObject2).getIntValue("returncode") != 200)
  868. return null;
  869. paramString = new RecommendItemNode();
  870. paramString.name = "广告";
  871. paramString.setSmallThumb(((JSONObject)localObject2).getString("imgurl"));
  872. paramString.isweb = true;
  873. ActivityNode localActivityNode = new ActivityNode();
  874. localActivityNode.name = "广告";
  875. localActivityNode.infoUrl = paramString.getApproximativeThumb();
  876. localActivityNode.contentUrl = ((JSONObject)localObject2).getString("clickurl");
  877. localActivityNode.desc = localActivityNode.name;
  878. localActivityNode.infoTitle = localActivityNode.name;
  879. localActivityNode.putUserInfo = false;
  880. Object localObject1 = ((JSONObject)localObject2).getJSONArray("imgtracking");
  881. localObject2 = ((JSONObject)localObject2).getJSONArray("thclkurl");
  882. int i;
  883. if ((localObject1 != null) && (((JSONArray)localObject1).size() > 0))
  884. {
  885. localActivityNode.imageTracking = new ArrayList();
  886. i = 0;
  887. while (i < ((JSONArray)localObject1).size())
  888. {
  889. String str = (String)((JSONArray)localObject1).get(i);
  890. localActivityNode.imageTracking.add(str);
  891. i += 1;
  892. }
  893. }
  894. if ((localObject2 != null) && (((JSONArray)localObject2).size() > 0))
  895. {
  896. localActivityNode.clickTracking = new ArrayList();
  897. i = j;
  898. while (i < ((JSONArray)localObject2).size())
  899. {
  900. localObject1 = (String)((JSONArray)localObject2).get(i);
  901. localActivityNode.clickTracking.add(localObject1);
  902. i += 1;
  903. }
  904. }
  905. paramString.mNode = localActivityNode;
  906. paramString = new Result(true, paramString);
  907. return paramString;
  908. }
  909. }
  910. catch (Exception paramString)
  911. {
  912. }
  913. return null;
  914. }
  915. private Result parseADWhiteList(String paramString)
  916. {
  917. if ((paramString != null) && (!paramString.equalsIgnoreCase("")));
  918. while (true)
  919. {
  920. int i;
  921. try
  922. {
  923. paramString = ((JSONObject)JSON.parse(paramString)).getJSONArray("data");
  924. if (paramString != null)
  925. {
  926. ArrayList localArrayList = new ArrayList();
  927. i = 0;
  928. if (i < paramString.size())
  929. {
  930. String str = paramString.getString(i);
  931. if (str == null)
  932. break label91;
  933. localArrayList.add(Integer.valueOf(str));
  934. break label91;
  935. }
  936. paramString = new Result(true, localArrayList);
  937. return paramString;
  938. }
  939. }
  940. catch (Exception paramString)
  941. {
  942. }
  943. return null;
  944. label91: i += 1;
  945. }
  946. }
  947. private Result parseAMAdConfig(String paramString)
  948. {
  949. if ((paramString != null) && (!paramString.equalsIgnoreCase("")));
  950. while (true)
  951. {
  952. int i;
  953. try
  954. {
  955. Object localObject = ((JSONObject)JSON.parse(paramString)).getJSONArray("data");
  956. if (localObject != null)
  957. {
  958. ArrayList localArrayList = new ArrayList();
  959. i = 0;
  960. if (i < ((JSONArray)localObject).size())
  961. {
  962. JSONObject localJSONObject = ((JSONArray)localObject).getJSONObject(i);
  963. if (localJSONObject == null)
  964. break label251;
  965. AdConfig localAdConfig = new AdConfig();
  966. localAdConfig.mAdvId = localJSONObject.getString("advid");
  967. localAdConfig.mAdMasterUrl = localJSONObject.getString("admasterurl");
  968. localAdConfig.mMiaozhenUrl = localJSONObject.getString("miaozhenurl");
  969. localAdConfig.mCustomerUrl = localJSONObject.getString("customerurl");
  970. localAdConfig.mMMAUrl = localJSONObject.getString("mmaurl");
  971. localAdConfig.mRegions = localJSONObject.getString("regions");
  972. localAdConfig.percent = localJSONObject.getIntValue("percent");
  973. localAdConfig.mEventType = localJSONObject.getString("eventtype");
  974. localArrayList.add(localAdConfig);
  975. break label251;
  976. }
  977. MobclickAgent.onEvent(InfoManager.getInstance().getContext(), "parseAMAdConfig", "succ");
  978. localObject = new Result(true, localArrayList);
  979. return localObject;
  980. }
  981. }
  982. catch (Exception localException)
  983. {
  984. }
  985. MobclickAgent.onEvent(InfoManager.getInstance().getContext(), "parseAMAdConfig", "f:" + paramString);
  986. return null;
  987. label251: i += 1;
  988. }
  989. }
  990. private Result parseAdsPos(String paramString)
  991. {
  992. if ((paramString != null) && (!paramString.equalsIgnoreCase("")))
  993. try
  994. {
  995. paramString = ((JSONObject)JSON.parse(paramString)).getJSONArray("data");
  996. if (paramString != null)
  997. {
  998. ArrayList localArrayList = new ArrayList();
  999. int i = 0;
  1000. while (i < paramString.size())
  1001. {
  1002. JSONObject localJSONObject = paramString.getJSONObject(i);
  1003. AdPos localAdPos = new AdPos();
  1004. localAdPos.posdesc = localJSONObject.getString("posdesc");
  1005. localAdPos.posid = localJSONObject.getString("posid");
  1006. localAdPos.posquery = localJSONObject.getString("posquery");
  1007. localAdPos.parseDesc();
  1008. localArrayList.add(localAdPos);
  1009. i += 1;
  1010. }
  1011. paramString = new Result(true, localArrayList);
  1012. return paramString;
  1013. }
  1014. }
  1015. catch (Exception paramString)
  1016. {
  1017. }
  1018. return null;
  1019. }
  1020. private Result parseAdvertisementInfo(String paramString)
  1021. {
  1022. if ((paramString != null) && (!paramString.equalsIgnoreCase("")));
  1023. while (true)
  1024. {
  1025. int i;
  1026. try
  1027. {
  1028. Object localObject1 = (JSONObject)JSON.parse(paramString);
  1029. i = ((JSONObject)localObject1).getIntValue("errorno");
  1030. paramString = new AdvertisementItemNode();
  1031. if (i == 0)
  1032. {
  1033. localObject1 = ((JSONObject)localObject1).getJSONObject("data");
  1034. paramString.id = ((JSONObject)localObject1).getString("id");
  1035. paramString.image = ((JSONObject)localObject1).getString("image");
  1036. paramString.resType = ((JSONObject)localObject1).getIntValue("restype");
  1037. i = ((JSONObject)localObject1).getIntValue("size");
  1038. paramString.width = (i / 10000);
  1039. paramString.height = (i - paramString.width * 10000);
  1040. paramString.audioPath = ((JSONObject)localObject1).getString("audio");
  1041. paramString.duration = ((JSONObject)localObject1).getIntValue("duration");
  1042. paramString.landing = ((JSONObject)localObject1).getString("landing");
  1043. paramString.desc = ((JSONObject)localObject1).getString("subtitle");
  1044. paramString.interval = ((JSONObject)localObject1).getIntValue("interval");
  1045. paramString.splash_landing = ((JSONObject)localObject1).getString("splash_landing");
  1046. paramString.skin = ((JSONObject)localObject1).getString("skin");
  1047. paramString.useLocalWebview = ((JSONObject)localObject1).getBooleanValue("use_default_browser");
  1048. if (paramString.useLocalWebview)
  1049. break label511;
  1050. bool = true;
  1051. paramString.useLocalWebview = bool;
  1052. paramString.internal_landing = ((JSONObject)localObject1).getString("internal_landing");
  1053. Object localObject2;
  1054. if ((paramString.internal_landing != null) && (!paramString.internal_landing.equalsIgnoreCase("")))
  1055. {
  1056. localObject2 = paramString.internal_landing.split("/");
  1057. if ((localObject2 != null) && (localObject2.length >= 5))
  1058. {
  1059. paramString.internal_catid = Integer.valueOf(localObject2[1]).intValue();
  1060. paramString.internal_channelid = Integer.valueOf(localObject2[2]).intValue();
  1061. paramString.interval_programid = Integer.valueOf(localObject2[3]).intValue();
  1062. paramString.interval_channeltype = Integer.valueOf(localObject2[4]).intValue();
  1063. }
  1064. }
  1065. localObject1 = ((JSONObject)localObject1).getJSONArray("trackers");
  1066. if (localObject1 != null)
  1067. {
  1068. paramString.mTracker.lstEventType = new ArrayList();
  1069. paramString.mTracker.lstProvider = new ArrayList();
  1070. paramString.mTracker.lstTrackerUrl = new ArrayList();
  1071. i = 0;
  1072. if (i < ((JSONArray)localObject1).size())
  1073. {
  1074. Object localObject3 = ((JSONArray)localObject1).getJSONObject(i);
  1075. localObject2 = ((JSONObject)localObject3).getString("provider");
  1076. String str = ((JSONObject)localObject3).getString("url");
  1077. localObject3 = ((JSONObject)localObject3).getString("event_type");
  1078. if ((localObject2 == null) || (str == null) || (localObject3 == null))
  1079. break label502;
  1080. paramString.mTracker.lstEventType.add(localObject3);
  1081. paramString.mTracker.lstProvider.add(localObject2);
  1082. paramString.mTracker.lstTrackerUrl.add(str);
  1083. break label502;
  1084. }
  1085. }
  1086. paramString = new Result(true, paramString);
  1087. return paramString;
  1088. }
  1089. }
  1090. catch (Exception paramString)
  1091. {
  1092. }
  1093. return null;
  1094. label502: i += 1;
  1095. continue;
  1096. label511: boolean bool = false;
  1097. }
  1098. }
  1099. private Result parseAllChannels(String paramString)
  1100. {
  1101. if ((paramString != null) && (!paramString.equalsIgnoreCase("")));
  1102. while (true)
  1103. {
  1104. int i;
  1105. try
  1106. {
  1107. JSONObject localJSONObject = (JSONObject)JSON.parse(paramString);
  1108. JSONArray localJSONArray = localJSONObject.getJSONArray("data");
  1109. if (localJSONArray != null)
  1110. {
  1111. ArrayList localArrayList = new ArrayList();
  1112. i = 0;
  1113. paramString = null;
  1114. if (i < localJSONArray.size())
  1115. {
  1116. ChannelNode localChannelNode = _parseChannelNode(localJSONArray.getJSONObject(i));
  1117. if (localChannelNode == null)
  1118. break label141;
  1119. localArrayList.add(localChannelNode);
  1120. localObject = localChannelNode;
  1121. if (paramString == null)
  1122. break label143;
  1123. paramString.nextSibling = localChannelNode;
  1124. localChannelNode.prevSibling = paramString;
  1125. localObject = localChannelNode;
  1126. break label143;
  1127. }
  1128. paramString = new Result(true, localArrayList, "total", String.valueOf(localJSONObject.getIntValue("total")));
  1129. return paramString;
  1130. }
  1131. }
  1132. catch (Exception paramString)
  1133. {
  1134. paramString.printStackTrace();
  1135. }
  1136. return null;
  1137. label141: Object localObject = paramString;
  1138. label143: i += 1;
  1139. paramString = (String)localObject;
  1140. }
  1141. }
  1142. private Result parseBillboardChannels(String paramString)
  1143. {
  1144. if ((paramString != null) && (!paramString.equalsIgnoreCase("")));
  1145. while (true)
  1146. {
  1147. int i;
  1148. try
  1149. {
  1150. paramString = ((JSONObject)JSON.parse(paramString)).getJSONArray("data");
  1151. if (paramString != null)
  1152. {
  1153. ArrayList localArrayList = new ArrayList();
  1154. i = 0;
  1155. if (i < paramString.size())
  1156. {
  1157. JSONObject localJSONObject1 = paramString.getJSONObject(i);
  1158. if (localJSONObject1 == null)
  1159. break label186;
  1160. BillboardItemNode localBillboardItemNode = new BillboardItemNode();
  1161. JSONObject localJSONObject2 = localJSONObject1.getJSONObject("detail");
  1162. if (localJSONObject2 != null)
  1163. {
  1164. ChannelNode localChannelNode = new ChannelNode();
  1165. String str = localJSONObject2.getString("type");
  1166. if ((str == null) || (!str.equalsIgnoreCase("channel_live")))
  1167. break label186;
  1168. localChannelNode.channelType = 0;
  1169. localBillboardItemNode.setDetail(_parseChannelNode(localJSONObject2));
  1170. }
  1171. localBillboardItemNode.name = localJSONObject1.getString("titile");
  1172. localBillboardItemNode.desc = localJSONObject1.getString("sub_title");
  1173. localArrayList.add(localBillboardItemNode);
  1174. break label186;
  1175. }
  1176. paramString = new Result(true, localArrayList);
  1177. return paramString;
  1178. }
  1179. }
  1180. catch (Exception paramString)
  1181. {
  1182. }
  1183. return null;
  1184. label186: i += 1;
  1185. }
  1186. }
  1187. private Result parseBillboardProgram(String paramString)
  1188. {
  1189. if ((paramString != null) && (!paramString.equalsIgnoreCase("")))
  1190. try
  1191. {
  1192. paramString = ((JSO

Large files files are truncated, but you can click here to view the full file