酷狗概念版 v2.5.5版本的 MD5 值为:782d327088fca4e58310f35a56f41319
以下内容为反编译后的 g.java 源代码,内容仅作参考
package com.kugou.android.app.home.channel.protocol;
import c.a.a.i;
import c.c.o;
import c.c.u;
import c.t;
import com.kugou.android.app.home.channel.entity.c;
import com.kugou.common.network.w;
import com.kugou.framework.database.channel.entity.ChannelEntity;
import d.ab;
import d.z;
import java.util.Collection;
import java.util.HashMap;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
import org.json.JSONArray;
import org.json.JSONObject;
import rx.e;
public class g {
public interface a {
@o
e<ab> a(@u Map<String, String> map, @c.c.a z zVar);
}
public static e<c> a(List<ChannelEntity> list) {
if (com.kugou.ktv.framework.common.b.a.a((Collection) list)) {
return e.a((Throwable) new com.kugou.android.app.home.channel.f.c("receive empty data."));
}
a aVar = (a) new t.a().b("ChannelTodayFeatured").a(i.a()).a(w.a(com.kugou.android.app.a.a.gm, "https://youth.kugou.com/v1/channel_batch_subscribe")).a(c.b.a.a.a()).a().b().a(a.class);
JSONArray jSONArray = new JSONArray();
Iterator<ChannelEntity> it = list.iterator();
while (it.hasNext()) {
jSONArray.put(it.next().f57740c);
}
String jSONArray2 = jSONArray.toString();
HashMap hashMap = new HashMap(12);
w.b(hashMap, jSONArray2);
return aVar.a(hashMap, z.a(d.u.a("application/json"), jSONArray2)).c(new rx.b.e<ab, e<c>>() {
@Override
public e<c> call(ab abVar) {
String str;
try {
str = abVar.f();
try {
JSONObject jSONObject = new JSONObject(str);
c cVar = new c();
cVar.a(jSONObject.optInt("status"));
cVar.b(jSONObject.optInt("error_code"));
return e.a(cVar);
} catch (Exception unused) {
return e.a((Throwable) new com.kugou.android.app.home.channel.f.c(str));
}
} catch (Exception unused2) {
str = null;
}
}
});
}
}