FLIX VISION v2.8.2版本的 MD5 值为:4d33b143293b36f23ce5a6a5834e6993
以下内容为反编译后的 JsonUtils.java 源代码,内容仅作参考
package flix.com.vision.utils;
import android.util.Log;
import androidx.annotation.Keep;
import cc.f;
import com.google.gson.l;
import com.google.gson.o;
import com.google.gson.q;
import com.google.gson.r;
import com.unity3d.ads.metadata.MediationMetaData;
import flix.com.vision.App;
import flix.com.vision.models.Movie;
import gb.e;
import ib.b;
import ib.g;
import ib.j;
import ib.p;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Date;
import java.util.Iterator;
import java.util.Locale;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
import o.a;
import org.jsoup.nodes.Document;
import org.jsoup.nodes.Element;
@Keep
public class JsonUtils {
public static boolean availableOnStreamingServices(o oVar) {
try {
q asJsonObject = oVar.getAsJsonObject().get("results").getAsJsonObject();
for (int i10 = 0; i10 < asJsonObject.size(); i10++) {
if (asJsonObject.get("US").getAsJsonObject() != null || asJsonObject.get("GB").getAsJsonObject() != null || asJsonObject.get("CA").getAsJsonObject() != null) {
return true;
}
}
} catch (Exception unused) {
}
return false;
}
public static p getDirector(o oVar) {
ArrayList arrayList = new ArrayList();
l asJsonArray = oVar.getAsJsonObject().get("crew").getAsJsonArray();
String str = "";
for (int i10 = 0; i10 < asJsonArray.size(); i10++) {
q asJsonObject = asJsonArray.get(i10).getAsJsonObject();
String asString = asJsonObject.get("job").getAsString();
if (asString != null && asString.trim().equalsIgnoreCase("director")) {
String asString2 = asJsonObject.get(MediationMetaData.KEY_NAME).getAsString();
if (asString2 != null) {
str = asString2;
}
long asLong = asJsonObject.get("id").getAsLong();
p pVar = new p();
if (str.isEmpty()) {
str = "N/A";
}
pVar.setName(str);
pVar.setId(asLong);
arrayList.add(pVar);
}
}
return (p) arrayList.get(0);
}
public static String getLogoPath(String str) {
q asJsonObject = r.parseString(str).getAsJsonObject();
if (asJsonObject == null) {
return null;
}
new ArrayList();
l asJsonArray = asJsonObject.getAsJsonObject().get("logos").getAsJsonArray();
if (asJsonArray.size() > 0) {
for (int i10 = 0; i10 < asJsonArray.size(); i10++) {
if (asJsonArray.get(i10).getAsJsonObject().get("iso_639_1").getAsString().equalsIgnoreCase("en")) {
return asJsonArray.get(i10).getAsJsonObject().get("file_path").getAsString();
}
}
}
return null;
}
public static String getWriters(o oVar) {
String asString;
l asJsonArray = oVar.getAsJsonObject().get("crew").getAsJsonArray();
String str = "";
for (int i10 = 0; i10 < asJsonArray.size(); i10++) {
q asJsonObject = asJsonArray.get(i10).getAsJsonObject();
String asString2 = asJsonObject.get("department").getAsString();
if (asString2 != null && asString2.trim().equalsIgnoreCase("writing") && (asString = asJsonObject.get(MediationMetaData.KEY_NAME).getAsString()) != null) {
str = a.d(str, asString, ", ");
}
}
String trim = str.trim();
return (trim == null || trim.isEmpty()) ? "N/A" : trim.substring(0, trim.length() - 1);
}
public static String getYearSplit(String str) {
return (f.isEmpty(str) || !str.contains("-")) ? "" : str.split("-")[0];
}
public static o parse(String str) {
return r.parseString(str);
}
public static String parse123MoviesHubearch(o oVar, String str, String str2) {
Document parse = ue.a.parse(oVar.getAsJsonObject().get("content").getAsString());
if (str2 != null) {
Iterator<Element> it = parse.getElementsByClass("ss-title").iterator();
while (it.hasNext()) {
Element next = it.next();
String text = next.text();
if (text.contains("(") && text.contains(str2) && text.replace("-", "").contains(str.replace("-", ""))) {
return next.attr("href").replace(".html", "").trim();
}
}
}
Iterator<Element> it2 = parse.getElementsByClass("ss-title").iterator();
while (it2.hasNext()) {
Element next2 = it2.next();
if (next2.text().replace("-", "").equalsIgnoreCase(str.replace("-", ""))) {
return next2.attr("href").replace(".html", "").trim();
}
}
Iterator<Element> it3 = parse.getElementsByClass("ss-title").iterator();
while (it3.hasNext()) {
Element next3 = it3.next();
if (f.removeSpecialChars(next3.text()).equalsIgnoreCase(f.removeSpecialChars(str))) {
return next3.attr("href").replace(".html", "").trim();
}
}
return "";
}
public static ArrayList<jb.a> parseAdultCategories(o oVar) {
if (oVar == null) {
return null;
}
ArrayList<jb.a> arrayList = new ArrayList<>();
l asJsonArray = oVar.getAsJsonObject().get("categories").getAsJsonArray();
for (int i10 = 0; i10 < asJsonArray.size(); i10++) {
q asJsonObject = asJsonArray.get(i10).getAsJsonObject();
String asString = asJsonObject.get("title").getAsString();
String asString2 = asJsonObject.get("url").getAsString();
String asString3 = asJsonObject.get("img_url").getAsString();
jb.a aVar = new jb.a();
aVar.f15470a = asString;
aVar.f15472c = asString2;
aVar.f15471b = asString3;
arrayList.add(aVar);
}
return arrayList;
}
public static ArrayList<b> parseCast(o oVar) {
if (oVar == null) {
return null;
}
l asJsonArray = oVar.getAsJsonObject().get("cast").getAsJsonArray();
ArrayList<b> arrayList = new ArrayList<>();
for (int i10 = 0; i10 < asJsonArray.size(); i10++) {
q asJsonObject = asJsonArray.get(i10).getAsJsonObject();
String asString = asJsonObject.get(MediationMetaData.KEY_NAME).getAsString();
String asString2 = asJsonObject.get("character").getAsString();
String str = "";
long asLong = asJsonObject.get("id").getAsLong();
try {
if (!asJsonObject.get("profile_path").isJsonNull()) {
str = App.f11720z + "w185" + asJsonObject.get("profile_path").getAsString();
}
} catch (Exception unused) {
}
b bVar = new b();
bVar.setName(asString);
bVar.setId(asLong);
bVar.f13765b = asString2;
bVar.setImg_url(str);
arrayList.add(bVar);
}
return arrayList;
}
public static ArrayList<Movie> parseCastMovies(o oVar, int i10) {
if (oVar == null) {
return null;
}
l asJsonArray = oVar.getAsJsonObject().get("cast").getAsJsonArray();
ArrayList<Movie> arrayList = new ArrayList<>();
for (int i11 = 0; i11 < asJsonArray.size(); i11++) {
arrayList.add(parseMovieData(asJsonArray.get(i11).getAsJsonObject(), i10));
}
return arrayList;
}
public static ArrayList<g> parseCategory(o oVar) {
l asJsonArray;
if (oVar == null || (asJsonArray = oVar.getAsJsonObject().get("genres").getAsJsonArray()) == null) {
return null;
}
ArrayList<g> arrayList = new ArrayList<>();
for (int i10 = 0; i10 < asJsonArray.size(); i10++) {
int asInt = asJsonArray.get(i10).getAsJsonObject().get("id").getAsInt();
String asString = asJsonArray.get(i10).getAsJsonObject().get(MediationMetaData.KEY_NAME).getAsString();
if (asInt != 16) {
g gVar = new g();
gVar.f13796a = asInt;
gVar.f13797b = asString;
arrayList.add(gVar);
}
}
return arrayList;
}
public static ArrayList<Movie> parseCollectionMovies(o oVar, int i10) {
if (oVar == null) {
return null;
}
l asJsonArray = oVar.getAsJsonObject().get("parts").getAsJsonArray();
ArrayList<Movie> arrayList = new ArrayList<>();
for (int i11 = 0; i11 < asJsonArray.size(); i11++) {
arrayList.add(parseMovieData(asJsonArray.get(i11).getAsJsonObject(), i10));
}
return arrayList;
}
public static ArrayList<Movie> parseDirectorMovies(o oVar, int i10) {
if (oVar == null) {
return null;
}
l asJsonArray = oVar.getAsJsonObject().get("crew").getAsJsonArray();
ArrayList<Movie> arrayList = new ArrayList<>();
for (int i11 = 0; i11 < asJsonArray.size(); i11++) {
q asJsonObject = asJsonArray.get(i11).getAsJsonObject();
String asString = asJsonObject.get("job").getAsString();
if (asString != null && asString.trim().equalsIgnoreCase("director")) {
arrayList.add(parseMovieData(asJsonObject, i10));
}
}
return arrayList;
}
public static String parseHDOSearch(o oVar, String str, String str2) {
Document parse = ue.a.parse(oVar.getAsJsonObject().get("content").getAsString());
Iterator<Element> it = parse.getElementsByClass("ss-title").iterator();
while (it.hasNext()) {
Element next = it.next();
if (next.text().equalsIgnoreCase(str)) {
String str3 = next.attr("href").replace(".html", "").trim().split("-")[r2.length - 1];
if (str2 == null) {
return str3;
}
try {
Iterator<Element> it2 = ((ve.b) ue.a.connect(a.b.l("https://solarmoviehd.ru/ajax/movie_get_info/", str3, ".html"))).get().getElementsByClass("jtip-top").first().getElementsByClass("jt-info").iterator();
while (it2.hasNext()) {
String trim = it2.next().text().trim();
if (!trim.contains("min") && trim.length() > 0 && trim.equals(str2)) {
return str3;
}
}
} catch (Exception e10) {
e10.printStackTrace();
return str3;
}
}
}
Iterator<Element> it3 = parse.getElementsByClass("ss-title").iterator();
while (it3.hasNext()) {
Element next2 = it3.next();
if (f.removeSpecialChars(next2.text()).equalsIgnoreCase(f.removeSpecialChars(str))) {
return next2.attr("href").replace(".html", "").trim().split("-")[r8.length - 1];
}
}
return null;
}
public static ArrayList<ib.o> parseLinks(o oVar) {
ArrayList<ib.o> arrayList = new ArrayList<>();
l asJsonArray = oVar.getAsJsonArray();
for (int i10 = 0; i10 < asJsonArray.size(); i10++) {
String asString = asJsonArray.get(i10).getAsJsonObject().get("urlvideo").getAsString();
ib.o oVar2 = new ib.o();
oVar2.f13838u = asString;
oVar2.f13832o = true;
oVar2.f13837t = nb.a.checkLinkLabel(asString) + "- HQ";
arrayList.add(oVar2);
}
return arrayList;
}
public static ArrayList<ib.f> parseListEpisode(o oVar, boolean z10) {
String str;
String str2;
String str3;
boolean z11;
String str4;
int asInt;
ArrayList<ib.f> arrayList = new ArrayList<>();
l asJsonArray = oVar.getAsJsonObject().get("episodes").getAsJsonArray();
int i10 = 0;
while (i10 < asJsonArray.size()) {
q asJsonObject = asJsonArray.get(i10).getAsJsonObject();
i10++;
new StringBuilder("Episode ").append(i10);
String str5 = "";
int i11 = 1;
String str6 = null;
try {
str2 = asJsonObject.get("air_date").getAsString();
} catch (Exception unused) {
str = null;
str2 = null;
str3 = null;
z11 = true;
}
if (str2 != null) {
try {
z11 = new SimpleDateFormat("yyyy-MM-dd").parse(str2).compareTo(new Date()) <= 0;
} catch (Exception unused2) {
}
if (!z11 && z10) {
}
i11 = asJsonObject.get("episode_number").getAsInt();
asJsonObject.get(MediationMetaData.KEY_NAME).getAsString();
str4 = asJsonObject.get("still_path").getAsString();
if (str4 != null) {
try {
str4 = App.f11720z + "w342" + str4;
} catch (Exception unused3) {
str = null;
str3 = null;
str6 = str4;
str4 = str6;
str6 = str;
ib.f fVar = new ib.f();
fVar.f13791o = i11;
fVar.f13785i = str4;
fVar.f13790n = str3;
fVar.f13795s = z11;
fVar.f13782b = str6;
fVar.f13783g = str2;
fVar.f13794r = str5;
arrayList.add(fVar);
}
}
str3 = asJsonObject.get(MediationMetaData.KEY_NAME).getAsString();
str6 = asJsonObject.get("overview").getAsString();
asJsonObject.get("id").getAsInt();
asInt = asJsonObject.get("runtime").getAsInt();
if (asInt > 0) {
str5 = "(" + asInt + " min)";
}
ib.f fVar2 = new ib.f();
fVar2.f13791o = i11;
fVar2.f13785i = str4;
fVar2.f13790n = str3;
fVar2.f13795s = z11;
fVar2.f13782b = str6;
fVar2.f13783g = str2;
fVar2.f13794r = str5;
arrayList.add(fVar2);
}
z11 = true;
i11 = asJsonObject.get("episode_number").getAsInt();
asJsonObject.get(MediationMetaData.KEY_NAME).getAsString();
str4 = asJsonObject.get("still_path").getAsString();
if (str4 != null) {
}
str3 = asJsonObject.get(MediationMetaData.KEY_NAME).getAsString();
str6 = asJsonObject.get("overview").getAsString();
asJsonObject.get("id").getAsInt();
asInt = asJsonObject.get("runtime").getAsInt();
if (asInt > 0) {
}
ib.f fVar22 = new ib.f();
fVar22.f13791o = i11;
fVar22.f13785i = str4;
fVar22.f13790n = str3;
fVar22.f13795s = z11;
fVar22.f13782b = str6;
fVar22.f13783g = str2;
fVar22.f13794r = str5;
arrayList.add(fVar22);
}
return arrayList;
}
public static ArrayList<Movie> parseListMovie(o oVar, int i10) {
if (oVar == null) {
return null;
}
l asJsonArray = oVar.getAsJsonObject().get("results").getAsJsonArray();
ArrayList<Movie> arrayList = new ArrayList<>();
for (int i11 = 0; i11 < asJsonArray.size(); i11++) {
q asJsonObject = asJsonArray.get(i11).getAsJsonObject();
try {
if (asJsonObject.get("release_date") != null || i10 != 0) {
arrayList.add(parseMovieSimple(asJsonObject, i10));
}
} catch (Exception unused) {
Log.d("", "");
}
}
return arrayList;
}
private static Movie parseMovie(q qVar, int i10) {
boolean z10;
String str;
String str2;
String str3;
String str4;
boolean z11;
long j10;
long j11;
String str5;
String str6;
String str7;
String str8;
long j12;
int i11;
String str9;
int i12;
String str10;
String str11;
long j13;
String str12;
int i13;
String str13;
String str14;
String str15;
String str16;
String str17;
String str18;
long j14;
String str19;
l lVar;
String str20;
q asJsonObject;
int asInt;
int asInt2;
String asString;
j jVar;
String str21;
String str22;
String asString2;
Movie movie = new Movie();
long asLong = qVar.get("id").getAsLong();
if (!qVar.get("adult").isJsonNull()) {
z10 = qVar.get("adult").getAsBoolean();
String str23 = "overview";
String asString3 = qVar.get("overview").getAsString();
if (qVar.get("poster_path").isJsonNull()) {
StringBuilder sb2 = new StringBuilder();
str = "imdb_id";
sb2.append(App.f11720z);
sb2.append("w500");
sb2.append(qVar.get("poster_path").getAsString());
str2 = sb2.toString();
} else {
str = "imdb_id";
str2 = "";
}
String str24 = MediationMetaData.KEY_NAME;
String str25 = null;
if (i10 == 0) {
if (qVar.has("belongs_to_collection")) {
q asJsonObject2 = qVar.getAsJsonObject("belongs_to_collection");
long asLong2 = asJsonObject2.has("id") ? asJsonObject2.get("id").getAsLong() : 0L;
try {
if (asJsonObject2.has(MediationMetaData.KEY_NAME)) {
str25 = asJsonObject2.get(MediationMetaData.KEY_NAME).getAsString();
}
} catch (Exception unused) {
}
str3 = str25;
str4 = str2;
long j15 = asLong2;
z11 = z10;
j10 = j15;
if (qVar.get("backdrop_path").isJsonNull()) {
j11 = asLong;
str5 = "";
str6 = str5;
str7 = str6;
} else {
str6 = qVar.get("backdrop_path").getAsString();
j11 = asLong;
str5 = "";
str7 = a.b.o(new StringBuilder(), App.f11720z, "w1280", str6);
}
if (!qVar.get("revenue").isJsonNull()) {
str8 = str7;
j12 = qVar.get("revenue").getAsInt();
if (!qVar.get("runtime").isJsonNull()) {
i11 = qVar.get("runtime").getAsInt();
String str26 = ", ";
if (i10 == 0) {
str13 = qVar.get("title").getAsString();
str16 = getYearSplit(qVar.get("release_date").getAsString());
str14 = qVar.get("release_date").getAsString();
i12 = i11;
str11 = ", ";
str10 = str6;
j13 = j12;
str9 = str8;
str12 = MediationMetaData.KEY_NAME;
str15 = str5;
i13 = -1;
} else {
String asString4 = qVar.get(MediationMetaData.KEY_NAME).getAsString();
str9 = str8;
l asJsonArray = qVar.get("created_by").getAsJsonArray();
i12 = i11;
str10 = str6;
String str27 = str5;
for (int i14 = 0; i14 < asJsonArray.size(); i14++) {
String asString5 = asJsonArray.get(i14).getAsJsonObject().get(MediationMetaData.KEY_NAME).getAsString();
if (asString5 != null && !asString5.isEmpty()) {
str27 = a.d(str27, asString5, ", ");
}
}
String trim = str27.trim();
if (trim.isEmpty()) {
trim = "N/A";
}
String substring = trim.substring(0, trim.length() - 1);
String yearSplit = getYearSplit(qVar.get("first_air_date").getAsString());
String asString6 = qVar.get("first_air_date").getAsString();
int asInt3 = qVar.get("number_of_seasons").isJsonNull() ? -1 : qVar.get("number_of_seasons").getAsInt();
l asJsonArray2 = qVar.get("seasons").getAsJsonArray();
int i15 = 0;
int i16 = 0;
while (i16 < asJsonArray2.size()) {
try {
asJsonObject = asJsonArray2.get(i16).getAsJsonObject();
str18 = yearSplit;
try {
asInt = asJsonObject.get("season_number").getAsInt();
lVar = asJsonArray2;
} catch (Exception unused2) {
str17 = str26;
j14 = j12;
str19 = str23;
lVar = asJsonArray2;
str20 = str24;
i16++;
yearSplit = str18;
asJsonArray2 = lVar;
str26 = str17;
str23 = str19;
str24 = str20;
j12 = j14;
}
} catch (Exception unused3) {
str17 = str26;
str18 = yearSplit;
}
if (asInt < 1) {
str17 = str26;
j14 = j12;
str19 = str23;
str20 = str24;
i16++;
yearSplit = str18;
asJsonArray2 = lVar;
str26 = str17;
str23 = str19;
str24 = str20;
j12 = j14;
} else {
int i17 = i15 + 1;
str17 = str26;
try {
asInt2 = asJsonObject.get("episode_count").getAsInt();
str19 = str23;
try {
asString = asJsonObject.get(str23).getAsString();
str20 = str24;
try {
jVar = new j();
} catch (Exception unused4) {
j14 = j12;
}
} catch (Exception unused5) {
j14 = j12;
str20 = str24;
i15 = i17;
i16++;
yearSplit = str18;
asJsonArray2 = lVar;
str26 = str17;
str23 = str19;
str24 = str20;
j12 = j14;
}
} catch (Exception unused6) {
j14 = j12;
str19 = str23;
}
try {
if (asJsonObject.get("poster_path") != null) {
j14 = j12;
try {
jVar.f13805j = App.f11720z + "w500" + asJsonObject.get("poster_path").getAsString();
} catch (Exception unused7) {
}
jVar.f13801b = "Season " + i17;
jVar.f13803h = asInt2;
jVar.f13802g = asInt;
jVar.f13804i = asString;
movie.f12382k.add(jVar);
}
jVar.f13801b = "Season " + i17;
jVar.f13803h = asInt2;
jVar.f13802g = asInt;
jVar.f13804i = asString;
movie.f12382k.add(jVar);
} catch (Exception unused8) {
i15 = i17;
i16++;
yearSplit = str18;
asJsonArray2 = lVar;
str26 = str17;
str23 = str19;
str24 = str20;
j12 = j14;
}
j14 = j12;
}
}
str11 = str26;
j13 = j12;
str12 = str24;
i13 = asInt3;
str13 = asString4;
str14 = asString6;
str15 = substring;
str16 = yearSplit;
}
double asDouble = qVar.get("vote_average").getAsDouble();
movie.f12383l = j10;
movie.f12385n = str3;
movie.setRevenue(j13);
StringBuilder sb3 = new StringBuilder();
sb3.append(asDouble);
String str28 = str5;
sb3.append(str28);
movie.setRating(sb3.toString());
movie.setDuration(i12);
movie.setMovieId(j11);
movie.f12381j = str10;
movie.setTitle(str13);
movie.setNSFK(z11);
movie.setRawReleaseDate(str14);
str21 = str;
if (!qVar.get(str21).isJsonNull()) {
movie.setImdbID(qVar.get(str21).getAsString());
}
if (i10 == 1) {
if (i13 > 0) {
movie.setSeason_count(i13);
} else {
movie.setSeason_count(10);
}
}
movie.setType(i10);
if (!f.isEmpty(str4)) {
String str29 = str4;
movie.setThumb(str29);
movie.setImage_url(str29);
}
if (!f.isEmpty(str9)) {
movie.setCover(str9);
}
movie.setOverview(asString3);
movie.f12396y = str16;
movie.setProduction(str28);
if (qVar.get("genres").isJsonNull()) {
str22 = str28;
} else {
l asJsonArray3 = qVar.get("genres").getAsJsonArray();
str22 = str28;
for (int i18 = 0; i18 < asJsonArray3.size(); i18++) {
str22 = a.d(str22, asJsonArray3.get(i18).getAsJsonObject().get(str12).getAsString(), str11);
}
}
movie.setGenres(str22);
asString2 = qVar.get("external_ids").getAsJsonObject().get(str21).getAsString();
if (asString2 != null && asString2.length() > 3) {
movie.f12397z = asString2;
}
movie.J = str15;
return movie;
}
i11 = 0;
String str262 = ", ";
if (i10 == 0) {
}
double asDouble2 = qVar.get("vote_average").getAsDouble();
movie.f12383l = j10;
movie.f12385n = str3;
movie.setRevenue(j13);
StringBuilder sb32 = new StringBuilder();
sb32.append(asDouble2);
String str282 = str5;
sb32.append(str282);
movie.setRating(sb32.toString());
movie.setDuration(i12);
movie.setMovieId(j11);
movie.f12381j = str10;
movie.setTitle(str13);
movie.setNSFK(z11);
movie.setRawReleaseDate(str14);
str21 = str;
if (!qVar.get(str21).isJsonNull()) {
}
if (i10 == 1) {
}
movie.setType(i10);
if (!f.isEmpty(str4)) {
}
if (!f.isEmpty(str9)) {
}
movie.setOverview(asString3);
movie.f12396y = str16;
movie.setProduction(str282);
if (qVar.get("genres").isJsonNull()) {
}
movie.setGenres(str22);
asString2 = qVar.get("external_ids").getAsJsonObject().get(str21).getAsString();
if (asString2 != null) {
movie.f12397z = asString2;
}
movie.J = str15;
return movie;
}
str8 = str7;
j12 = 0;
if (!qVar.get("runtime").isJsonNull()) {
}
i11 = 0;
String str2622 = ", ";
if (i10 == 0) {
}
double asDouble22 = qVar.get("vote_average").getAsDouble();
movie.f12383l = j10;
movie.f12385n = str3;
movie.setRevenue(j13);
StringBuilder sb322 = new StringBuilder();
sb322.append(asDouble22);
String str2822 = str5;
sb322.append(str2822);
movie.setRating(sb322.toString());
movie.setDuration(i12);
movie.setMovieId(j11);
movie.f12381j = str10;
movie.setTitle(str13);
movie.setNSFK(z11);
movie.setRawReleaseDate(str14);
str21 = str;
if (!qVar.get(str21).isJsonNull()) {
}
if (i10 == 1) {
}
movie.setType(i10);
if (!f.isEmpty(str4)) {
}
if (!f.isEmpty(str9)) {
}
movie.setOverview(asString3);
movie.f12396y = str16;
movie.setProduction(str2822);
if (qVar.get("genres").isJsonNull()) {
}
movie.setGenres(str22);
asString2 = qVar.get("external_ids").getAsJsonObject().get(str21).getAsString();
if (asString2 != null) {
}
movie.J = str15;
return movie;
}
}
z11 = z10;
str3 = null;
str4 = str2;
j10 = 0;
if (qVar.get("backdrop_path").isJsonNull()) {
}
if (!qVar.get("revenue").isJsonNull()) {
}
str8 = str7;
j12 = 0;
if (!qVar.get("runtime").isJsonNull()) {
}
i11 = 0;
String str26222 = ", ";
if (i10 == 0) {
}
double asDouble222 = qVar.get("vote_average").getAsDouble();
movie.f12383l = j10;
movie.f12385n = str3;
movie.setRevenue(j13);
StringBuilder sb3222 = new StringBuilder();
sb3222.append(asDouble222);
String str28222 = str5;
sb3222.append(str28222);
movie.setRating(sb3222.toString());
movie.setDuration(i12);
movie.setMovieId(j11);
movie.f12381j = str10;
movie.setTitle(str13);
movie.setNSFK(z11);
movie.setRawReleaseDate(str14);
str21 = str;
if (!qVar.get(str21).isJsonNull()) {
}
if (i10 == 1) {
}
movie.setType(i10);
if (!f.isEmpty(str4)) {
}
if (!f.isEmpty(str9)) {
}
movie.setOverview(asString3);
movie.f12396y = str16;
movie.setProduction(str28222);
if (qVar.get("genres").isJsonNull()) {
}
movie.setGenres(str22);
asString2 = qVar.get("external_ids").getAsJsonObject().get(str21).getAsString();
if (asString2 != null) {
}
movie.J = str15;
return movie;
}
z10 = false;
String str232 = "overview";
String asString32 = qVar.get("overview").getAsString();
if (qVar.get("poster_path").isJsonNull()) {
}
String str242 = MediationMetaData.KEY_NAME;
String str252 = null;
if (i10 == 0) {
}
z11 = z10;
str3 = null;
str4 = str2;
j10 = 0;
if (qVar.get("backdrop_path").isJsonNull()) {
}
if (!qVar.get("revenue").isJsonNull()) {
}
str8 = str7;
j12 = 0;
if (!qVar.get("runtime").isJsonNull()) {
}
i11 = 0;
String str262222 = ", ";
if (i10 == 0) {
}
double asDouble2222 = qVar.get("vote_average").getAsDouble();
movie.f12383l = j10;
movie.f12385n = str3;
movie.setRevenue(j13);
StringBuilder sb32222 = new StringBuilder();
sb32222.append(asDouble2222);
String str282222 = str5;
sb32222.append(str282222);
movie.setRating(sb32222.toString());
movie.setDuration(i12);
movie.setMovieId(j11);
movie.f12381j = str10;
movie.setTitle(str13);
movie.setNSFK(z11);
movie.setRawReleaseDate(str14);
str21 = str;
if (!qVar.get(str21).isJsonNull()) {
}
if (i10 == 1) {
}
movie.setType(i10);
if (!f.isEmpty(str4)) {
}
if (!f.isEmpty(str9)) {
}
movie.setOverview(asString32);
movie.f12396y = str16;
movie.setProduction(str282222);
if (qVar.get("genres").isJsonNull()) {
}
movie.setGenres(str22);
asString2 = qVar.get("external_ids").getAsJsonObject().get(str21).getAsString();
if (asString2 != null) {
}
movie.J = str15;
return movie;
}
private static Movie parseMovieData(q qVar, int i10) {
String str;
String str2;
String str3;
String str4;
String str5;
String str6;
long asInt = qVar.get("id").getAsInt();
boolean z10 = false;
try {
if (!qVar.get("adult").isJsonNull()) {
z10 = qVar.get("adult").getAsBoolean();
}
} catch (Exception unused) {
}
String asString = qVar.get("overview").getAsString();
if (qVar.get("poster_path").isJsonNull()) {
str = "";
} else {
str = App.f11720z + "w300" + qVar.get("poster_path").getAsString();
}
int i11 = -1;
if (i10 == 0) {
str4 = qVar.get("title").getAsString();
try {
str6 = getYearSplit(qVar.get("release_date").getAsString());
} catch (Exception unused2) {
str6 = "";
}
try {
str5 = qVar.get("release_date").getAsString();
} catch (Exception unused3) {
str5 = "";
double asDouble = qVar.get("vote_average").getAsDouble();
Movie movie = new Movie();
movie.setRevenue(0L);
movie.setRating(asDouble + "");
movie.setMovieId(asInt);
movie.setTitle(str4);
movie.setNSFK(z10);
movie.setRawReleaseDate(str5);
if (i10 == 1) {
}
movie.setType(i10);
if (!f.isEmpty(str)) {
}
if (!f.isEmpty("")) {
}
movie.setOverview(asString);
movie.f12396y = str6;
movie.setProduction("");
movie.setGenres("");
return movie;
}
} else {
String asString2 = qVar.get(MediationMetaData.KEY_NAME).getAsString();
try {
str2 = getYearSplit(qVar.get("first_air_date").getAsString());
try {
str3 = qVar.get("first_air_date").getAsString();
} catch (Exception unused4) {
str3 = "";
if (!qVar.get("number_of_seasons").isJsonNull()) {
}
str4 = asString2;
str5 = str3;
str6 = str2;
double asDouble2 = qVar.get("vote_average").getAsDouble();
Movie movie2 = new Movie();
movie2.setRevenue(0L);
movie2.setRating(asDouble2 + "");
movie2.setMovieId(asInt);
movie2.setTitle(str4);
movie2.setNSFK(z10);
movie2.setRawReleaseDate(str5);
if (i10 == 1) {
}
movie2.setType(i10);
if (!f.isEmpty(str)) {
}
if (!f.isEmpty("")) {
}
movie2.setOverview(asString);
movie2.f12396y = str6;
movie2.setProduction("");
movie2.setGenres("");
return movie2;
}
} catch (Exception unused5) {
str2 = "";
}
try {
if (!qVar.get("number_of_seasons").isJsonNull()) {
i11 = qVar.get("number_of_seasons").getAsInt();
}
} catch (Exception unused6) {
}
str4 = asString2;
str5 = str3;
str6 = str2;
}
double asDouble22 = qVar.get("vote_average").getAsDouble();
Movie movie22 = new Movie();
movie22.setRevenue(0L);
movie22.setRating(asDouble22 + "");
movie22.setMovieId(asInt);
movie22.setTitle(str4);
movie22.setNSFK(z10);
movie22.setRawReleaseDate(str5);
if (i10 == 1) {
if (i11 > 0) {
movie22.setSeason_count(i11);
} else {
movie22.setSeason_count(10);
}
}
movie22.setType(i10);
if (!f.isEmpty(str)) {
movie22.setThumb(str);
movie22.setImage_url(str);
}
if (!f.isEmpty("")) {
movie22.setCover("");
}
movie22.setOverview(asString);
movie22.f12396y = str6;
movie22.setProduction("");
movie22.setGenres("");
return movie22;
}
public static kb.a parseMovieHindi(String str) {
Matcher matcher = Pattern.compile("\\{.*?\\};").matcher(str);
if (matcher.find()) {
try {
q asJsonObject = r.parseString(matcher.group(0).replace("pc =", "").replace("};", "}").trim()).getAsJsonObject();
String asString = asJsonObject.get("file").getAsString();
String asString2 = asJsonObject.get("key").getAsString();
asJsonObject.get("host").getAsString();
asJsonObject.get("href").getAsString();
kb.a aVar = new kb.a();
aVar.f15724b = asString;
aVar.f15723a = asString2;
return aVar;
} catch (Exception unused) {
}
}
return null;
}
public static kb.a parseMovieHindi2(String str) {
Matcher matcher = Pattern.compile("\\(.*?\\}\\);").matcher(str);
if (matcher.find()) {
try {
q asJsonObject = r.parseString(matcher.group(0).replace("({", "{").replace(");", "").trim()).getAsJsonObject();
String asString = asJsonObject.get("file").getAsString();
String asString2 = asJsonObject.get("key").getAsString();
asJsonObject.get("host").getAsString();
asJsonObject.get("href").getAsString();
kb.a aVar = new kb.a();
aVar.f15724b = asString;
aVar.f15723a = asString2;
return aVar;
} catch (Exception unused) {
}
}
return null;
}
public static kb.a parseMovieHindiSeries(String str) {
Matcher matcher = Pattern.compile("\\(.*?\\}\\);").matcher(str);
if (matcher.find()) {
try {
q asJsonObject = r.parseString(matcher.group(0).replace("({", "{").replace(");", "").trim()).getAsJsonObject();
String asString = asJsonObject.get("file").getAsString();
String asString2 = asJsonObject.get("key").getAsString();
asJsonObject.get("host").getAsString();
asJsonObject.get("href").getAsString();
kb.a aVar = new kb.a();
aVar.f15724b = asString;
aVar.f15723a = asString2;
return aVar;
} catch (Exception unused) {
}
}
return null;
}
public static kb.a parseMovieHindiSeries2(String str) {
Matcher matcher = Pattern.compile("\\{.*?\\};").matcher(str);
if (matcher.find()) {
try {
q asJsonObject = r.parseString(matcher.group(0).replace("({", "{").replace(");", "").trim()).getAsJsonObject();
String asString = asJsonObject.get("file").getAsString();
String asString2 = asJsonObject.get("key").getAsString();
asJsonObject.get("host").getAsString();
asJsonObject.get("href").getAsString();
kb.a aVar = new kb.a();
aVar.f15724b = asString;
aVar.f15723a = asString2;
return aVar;
} catch (Exception unused) {
}
}
return null;
}
public static Movie parseMovieInfo(o oVar, int i10) {
return parseMovie(oVar.getAsJsonObject(), i10);
}
private static Movie parseMovieMulti(q qVar) {
boolean z10;
int i10;
String str;
String str2;
String str3;
String asString;
Movie movie;
String str4;
long asInt = qVar.get("id").getAsInt();
if (!qVar.get("adult").isJsonNull()) {
z10 = qVar.get("adult").getAsBoolean();
String asString2 = qVar.get("media_type").getAsString();
i10 = asString2.equalsIgnoreCase("movie") ? 0 : asString2.equalsIgnoreCase("tv") ? 1 : 3;
if (i10 != 3) {
return null;
}
String asString3 = qVar.get("overview").getAsString();
if (qVar.get("poster_path").isJsonNull()) {
str = "";
} else {
str = App.f11720z + "w300" + qVar.get("poster_path").getAsString();
}
String asString4 = !qVar.get("backdrop_path").isJsonNull() ? qVar.get("backdrop_path").getAsString() : "";
if (i10 == 0) {
str3 = qVar.get("title").getAsString();
try {
str2 = getYearSplit(qVar.get("release_date").getAsString());
} catch (Exception unused) {
str2 = "";
}
try {
asString = qVar.get("release_date").getAsString();
} catch (Exception unused2) {
asString = "";
double asDouble = qVar.get("vote_average").getAsDouble();
movie = new Movie();
str4 = asString4;
movie.setRevenue(0L);
movie.setRating(asDouble + "");
movie.setMovieId(asInt);
movie.setType(i10);
movie.setTitle(str3);
if (str4 != null) {
movie.f12381j = str4;
}
movie.setNSFK(z10);
movie.setRawReleaseDate(asString);
if (i10 == 1) {
}
movie.setType(i10);
if (!f.isEmpty(str)) {
}
if (!f.isEmpty("")) {
}
movie.setOverview(asString3);
movie.f12396y = str2;
movie.setProduction("");
movie.setGenres("");
return movie;
}
} else {
String asString5 = qVar.get(MediationMetaData.KEY_NAME).getAsString();
try {
str2 = getYearSplit(qVar.get("first_air_date").getAsString());
} catch (Exception unused3) {
str2 = "";
}
try {
str3 = asString5;
asString = qVar.get("first_air_date").getAsString();
} catch (Exception unused4) {
str3 = asString5;
asString = "";
double asDouble2 = qVar.get("vote_average").getAsDouble();
movie = new Movie();
str4 = asString4;
movie.setRevenue(0L);
movie.setRating(asDouble2 + "");
movie.setMovieId(asInt);
movie.setType(i10);
movie.setTitle(str3);
if (str4 != null) {
}
movie.setNSFK(z10);
movie.setRawReleaseDate(asString);
if (i10 == 1) {
}
movie.setType(i10);
if (!f.isEmpty(str)) {
}
if (!f.isEmpty("")) {
}
movie.setOverview(asString3);
movie.f12396y = str2;
movie.setProduction("");
movie.setGenres("");
return movie;
}
}
double asDouble22 = qVar.get("vote_average").getAsDouble();
movie = new Movie();
str4 = asString4;
movie.setRevenue(0L);
movie.setRating(asDouble22 + "");
movie.setMovieId(asInt);
movie.setType(i10);
movie.setTitle(str3);
if (str4 != null && !str4.isEmpty()) {
movie.f12381j = str4;
}
movie.setNSFK(z10);
movie.setRawReleaseDate(asString);
if (i10 == 1) {
movie.setSeason_count(10);
}
movie.setType(i10);
if (!f.isEmpty(str)) {
movie.setThumb(str);
movie.setImage_url(str);
}
if (!f.isEmpty("")) {
movie.setCover("");
}
movie.setOverview(asString3);
movie.f12396y = str2;
movie.setProduction("");
movie.setGenres("");
return movie;
}
z10 = false;
String asString22 = qVar.get("media_type").getAsString();
if (asString22.equalsIgnoreCase("movie")) {
}
if (i10 != 3) {
}
}
private static Movie parseMovieSimple(q qVar, int i10) {
boolean z10;
String str;
String str2;
String str3;
String str4;
l asJsonArray;
int i11;
long asInt = qVar.get("id").getAsInt();
if (!qVar.get("adult").isJsonNull()) {
z10 = qVar.get("adult").getAsBoolean();
String asString = qVar.get("backdrop_path").isJsonNull() ? qVar.get("backdrop_path").getAsString() : null;
String asString2 = qVar.get("overview").getAsString();
if (!qVar.get("poster_path").isJsonNull()) {
str = App.f11720z + "w500" + qVar.get("poster_path").getAsString();
int i12 = -1;
if (i10 == 0) {
str2 = qVar.get("title").getAsString();
str4 = getYearSplit(qVar.get("release_date").getAsString());
str3 = qVar.get("release_date").getAsString();
} else {
String asString3 = qVar.get(MediationMetaData.KEY_NAME).getAsString();
String yearSplit = getYearSplit(qVar.get("first_air_date").getAsString());
String asString4 = qVar.get("first_air_date").getAsString();
try {
if (!qVar.get("number_of_seasons").isJsonNull()) {
i12 = qVar.get("number_of_seasons").getAsInt();
}
} catch (Exception unused) {
}
str2 = asString3;
str3 = asString4;
str4 = yearSplit;
}
double asDouble = qVar.get("vote_average").getAsDouble();
Movie movie = new Movie();
String str5 = str4;
i11 = 0;
for (asJsonArray = qVar.getAsJsonArray("genre_ids"); i11 < asJsonArray.size(); asJsonArray = asJsonArray) {
movie.f12380i.add(Integer.valueOf(asJsonArray.get(i11).getAsInt()));
i11++;
}
int i13 = i12;
movie.setRevenue(0L);
movie.setRating(asDouble + "");
movie.setMovieId(asInt);
movie.setTitle(str2);
movie.setNSFK(z10);
movie.f12381j = asString;
movie.setRawReleaseDate(str3);
if (i10 == 1) {
if (i13 > 0) {
movie.setSeason_count(i13);
} else {
movie.setSeason_count(10);
}
}
movie.setType(i10);
if (!f.isEmpty(str)) {
movie.setThumb(str);
movie.setImage_url(str);
}
if (!f.isEmpty("")) {
movie.setCover("");
}
movie.setOverview(asString2);
movie.f12396y = str5;
movie.setProduction("");
movie.setGenres("");
return movie;
}
str = "";
int i122 = -1;
if (i10 == 0) {
}
double asDouble2 = qVar.get("vote_average").getAsDouble();
Movie movie2 = new Movie();
String str52 = str4;
i11 = 0;
while (i11 < asJsonArray.size()) {
}
int i132 = i122;
movie2.setRevenue(0L);
movie2.setRating(asDouble2 + "");
movie2.setMovieId(asInt);
movie2.setTitle(str2);
movie2.setNSFK(z10);
movie2.f12381j = asString;
movie2.setRawReleaseDate(str3);
if (i10 == 1) {
}
movie2.setType(i10);
if (!f.isEmpty(str)) {
}
if (!f.isEmpty("")) {
}
movie2.setOverview(asString2);
movie2.f12396y = str52;
movie2.setProduction("");
movie2.setGenres("");
return movie2;
}
z10 = false;
if (qVar.get("backdrop_path").isJsonNull()) {
}
String asString22 = qVar.get("overview").getAsString();
if (!qVar.get("poster_path").isJsonNull()) {
}
str = "";
int i1222 = -1;
if (i10 == 0) {
}
double asDouble22 = qVar.get("vote_average").getAsDouble();
Movie movie22 = new Movie();
String str522 = str4;
i11 = 0;
while (i11 < asJsonArray.size()) {
}
int i1322 = i1222;
movie22.setRevenue(0L);
movie22.setRating(asDouble22 + "");
movie22.setMovieId(asInt);
movie22.setTitle(str2);
movie22.setNSFK(z10);
movie22.f12381j = asString;
movie22.setRawReleaseDate(str3);
if (i10 == 1) {
}
movie22.setType(i10);
if (!f.isEmpty(str)) {
}
if (!f.isEmpty("")) {
}
movie22.setOverview(asString22);
movie22.f12396y = str522;
movie22.setProduction("");
movie22.setGenres("");
return movie22;
}
private static ArrayList<Movie> parseMoviesFromKownfor(q qVar) {
ArrayList<Movie> arrayList = new ArrayList<>();
try {
l asJsonArray = qVar.getAsJsonObject().get("known_for").getAsJsonArray();
for (int i10 = 0; i10 < asJsonArray.size(); i10++) {
Movie parseMovieMulti = parseMovieMulti(asJsonArray.get(i10).getAsJsonObject());
if (parseMovieMulti != null && !parseMovieMulti.getTitle().toLowerCase(Locale.ROOT).trim().equals("gomorrah")) {
arrayList.add(parseMovieMulti);
}
}
} catch (Exception unused) {
}
return arrayList;
}
public static ArrayList<b> parsePeople(o oVar) {
if (oVar == null) {
return null;
}
l asJsonArray = oVar.getAsJsonObject().get("results").getAsJsonArray();
ArrayList<b> arrayList = new ArrayList<>();
for (int i10 = 0; i10 < asJsonArray.size(); i10++) {
q asJsonObject = asJsonArray.get(i10).getAsJsonObject();
b bVar = new b();
String asString = asJsonObject.get(MediationMetaData.KEY_NAME).getAsString();
String str = App.f11720z + "w185" + asJsonObject.get("profile_path").getAsString();
int asInt = asJsonObject.get("id").getAsInt();
bVar.setName(asString);
bVar.setId(asInt);
bVar.setImg_url(str);
arrayList.add(bVar);
}
return arrayList;
}
public static ArrayList<kb.b> parsePlaylistHindi(l lVar) {
ArrayList<kb.b> arrayList = new ArrayList<>();
for (int i10 = 0; i10 < lVar.size(); i10++) {
try {
q asJsonObject = lVar.get(i10).getAsJsonObject();
String asString = asJsonObject.get("file").getAsString();
asJsonObject.get("id").getAsString();
String asString2 = asJsonObject.get("title").getAsString();
kb.b bVar = new kb.b();
bVar.f15725a = asString;
bVar.f15726b = asString2;
arrayList.add(bVar);
} catch (Exception unused) {
}
}
return arrayList;
}
public static ArrayList<kb.b> parsePlaylistHindiSeries(l lVar, int i10, int i11) {
ArrayList<kb.b> arrayList = new ArrayList<>();
for (int i12 = 0; i12 < lVar.size(); i12++) {
try {
q asJsonObject = lVar.get(i12).getAsJsonObject();
if (asJsonObject.get("id").getAsString().equalsIgnoreCase(i10 + "")) {
l asJsonArray = asJsonObject.getAsJsonArray("folder");
for (int i13 = 0; i13 < asJsonArray.size(); i13++) {
q asJsonObject2 = asJsonArray.get(i13).getAsJsonObject();
if (asJsonObject2.get("episode").getAsString().equalsIgnoreCase(i11 + "")) {
l asJsonArray2 = asJsonObject2.get("folder").getAsJsonArray();
for (int i14 = 0; i14 < asJsonArray2.size(); i14++) {
try {
q asJsonObject3 = asJsonArray2.get(i14).getAsJsonObject();
String asString = asJsonObject3.get("file").getAsString();
asJsonObject3.get("id").getAsString();
String asString2 = asJsonObject3.get("title").getAsString();
kb.b bVar = new kb.b();
bVar.f15725a = asString;
bVar.f15726b = asString2;
arrayList.add(bVar);
} catch (Exception unused) {
}
}
}
}
}
} catch (Exception unused2) {
}
}
return arrayList;
}
public static ib.o parseRDVideo(o oVar) {
if (oVar == null) {
return null;
}
try {
q asJsonObject = oVar.getAsJsonObject();
String asString = asJsonObject.get("download").getAsString();
String asString2 = asJsonObject.get("host").getAsString();
String asString3 = asJsonObject.get("mimeType").getAsString();
if (asString2 == null) {
asString2 = "RD.NET";
}
int asInt = asJsonObject.get("streamable").getAsInt();
long asLong = asJsonObject.get("filesize").getAsLong();
String str = "";
if (asLong != 0 && asLong != -1) {
str = e.readableFileSize(asLong);
}
if (asInt <= 0) {
return null;
}
ib.o oVar2 = new ib.o();
try {
oVar2.f13838u = asString;
oVar2.f13837t = "[" + asString2.toUpperCase() + "] [RD] [" + str + "]";
oVar2.f13834q = true;
oVar2.f13827j = asString3;
oVar2.f13832o = true;
return oVar2;
} catch (Exception unused) {
return oVar2;
}
} catch (Exception unused2) {
return null;
}
}
public static String parseRating(o oVar, int i10, String str) {
l asJsonArray = oVar.getAsJsonObject().get("results").getAsJsonArray();
String str2 = "NA";
int i11 = 0;
while (i11 < asJsonArray.size()) {
q asJsonObject = asJsonArray.get(i11).getAsJsonObject();
String asString = asJsonObject.get("iso_3166_1").getAsString();
if (asString.equalsIgnoreCase(str)) {
l asJsonArray2 = asJsonObject.getAsJsonArray("release_dates");
for (int i12 = 0; i12 < asJsonArray2.size(); i12++) {
String asString2 = asJsonArray2.get(i12).getAsJsonObject().get("certification").getAsString();
if (asString2 != null && !asString2.isEmpty()) {
return asString2;
}
}
}
i11++;
str2 = asString;
}
return !str2.isEmpty() ? str2 : "0";
}
public static String parseRatingSeries(o oVar, int i10, String str) {
l asJsonArray = oVar.getAsJsonObject().get("results").getAsJsonArray();
String str2 = null;
for (int i11 = 0; i11 < asJsonArray.size(); i11++) {
q asJsonObject = asJsonArray.get(i11).getAsJsonObject();
if (asJsonObject.get("iso_3166_1").getAsString().equalsIgnoreCase(str) && (str2 = asJsonObject.get("rating").getAsString()) != null && !str2.isEmpty()) {
return str2;
}
}
return ((str2 == null || !str2.isEmpty()) && !str.equalsIgnoreCase("us")) ? parseRatingSeries(oVar, i10, "us") : "0";
}
public static ArrayList<Movie> parseSearchMovies(o oVar, int i10) {
if (oVar == null) {
return null;
}
l asJsonArray = oVar.getAsJsonObject().get("results").getAsJsonArray();
ArrayList<Movie> arrayList = new ArrayList<>();
for (int i11 = 0; i11 < asJsonArray.size(); i11++) {
Movie parseMovieData = parseMovieData(asJsonArray.get(i11).getAsJsonObject(), i10);
if (!parseMovieData.getTitle().toLowerCase(Locale.ROOT).trim().equals("gomorrah")) {
arrayList.add(parseMovieData);
}
}
return arrayList;
}
public static ArrayList<Movie> parseSearchMulti(o oVar) {
if (oVar == null) {
return null;
}
l asJsonArray = oVar.getAsJsonObject().get("results").getAsJsonArray();
ArrayList<Movie> arrayList = new ArrayList<>();
for (int i10 = 0; i10 < asJsonArray.size(); i10++) {
q asJsonObject = asJsonArray.get(i10).getAsJsonObject();
Movie parseMovieMulti = parseMovieMulti(asJsonObject);
if (parseMovieMulti == null || parseMovieMulti.getTitle().toLowerCase(Locale.ROOT).trim().equals("gomorrah")) {
arrayList.addAll(parseMoviesFromKownfor(asJsonObject));
} else {
arrayList.add(parseMovieMulti);
}
}
return arrayList;
}
public static ArrayList<String> parseSuggestions(o oVar) {
ArrayList<String> arrayList = new ArrayList<>();
l asJsonArray = oVar.getAsJsonObject().get("results").getAsJsonArray();
for (int i10 = 0; i10 < asJsonArray.size(); i10++) {
q asJsonObject = asJsonArray.get(i10).getAsJsonObject();
try {
try {
arrayList.add(asJsonObject.getAsJsonObject().get("title").getAsString());
} catch (Exception unused) {
}
} catch (Exception unused2) {
arrayList.add(asJsonObject.getAsJsonObject().get(MediationMetaData.KEY_NAME).getAsString());
}
}
return arrayList;
}
public static ArrayList<String> parseSuggestionsGoogle(o oVar) {
ArrayList<String> arrayList = new ArrayList<>();
l asJsonArray = oVar.getAsJsonArray().get(1).getAsJsonArray();
for (int i10 = 0; i10 < asJsonArray.size(); i10++) {
arrayList.add(asJsonArray.get(i10).getAsString());
}
return arrayList;
}
public static String parseTrailer(o oVar) {
if (oVar == null) {
return null;
}
l asJsonArray = oVar.getAsJsonObject().get("results").getAsJsonArray();
for (int i10 = 0; i10 < asJsonArray.size(); i10++) {
q asJsonObject = asJsonArray.get(i10).getAsJsonObject();
String asString = asJsonObject.get("site").getAsString();
String asString2 = asJsonObject.get("type").getAsString();
if (asString != null && asString.equalsIgnoreCase("YouTube") && asString2 != null && asString2.equalsIgnoreCase("trailer")) {
return asJsonObject.get("key").getAsString();
}
}
return null;
}
public static ArrayList<p> parseWriters(o oVar) {
if (oVar == null) {
return null;
}
l asJsonArray = oVar.getAsJsonObject().get("crew").getAsJsonArray();
ArrayList<p> arrayList = new ArrayList<>();
for (int i10 = 0; i10 < asJsonArray.size(); i10++) {
q asJsonObject = asJsonArray.get(i10).getAsJsonObject();
String asString = asJsonObject.get(MediationMetaData.KEY_NAME).getAsString();
asJsonObject.get("job").getAsString();
asJsonObject.get("department").getAsString();
long asLong = asJsonObject.get("id").getAsLong();
p pVar = new p();
pVar.setName(asString);
pVar.setId(asLong);
pVar.setImg_url("");
arrayList.add(pVar);
}
return arrayList;
}
}