TopTV v3.0.1版本的 MD5 值为:0fc1b9ce94885bc92edd11a6ee3e5932

以下内容为反编译后的 ViewDetailsTMDBActivity.java 源代码,内容仅作参考


package com.toptvone.toptviptvbox.view.activity;

import a.b.k.b;
import a.b.q.j0;
import android.animation.ObjectAnimator;
import android.annotation.SuppressLint;
import android.app.ProgressDialog;
import android.content.Context;
import android.content.DialogInterface;
import android.content.Intent;
import android.content.SharedPreferences;
import android.graphics.Bitmap;
import android.graphics.drawable.BitmapDrawable;
import android.os.Build;
import android.os.Bundle;
import android.util.Log;
import android.util.TypedValue;
import android.view.KeyEvent;
import android.view.LayoutInflater;
import android.view.Menu;
import android.view.MenuItem;
import android.view.View;
import android.view.Window;
import android.widget.Button;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.PopupWindow;
import android.widget.RatingBar;
import android.widget.RelativeLayout;
import android.widget.ScrollView;
import android.widget.TextView;
import androidx.appcompat.widget.ActionMenuView;
import androidx.appcompat.widget.Toolbar;
import androidx.core.widget.NestedScrollView;
import androidx.recyclerview.widget.LinearLayoutManager;
import androidx.recyclerview.widget.RecyclerView;
import butterknife.BindView;
import butterknife.ButterKnife;
import butterknife.OnClick;
import com.google.android.material.appbar.AppBarLayout;
import com.toptvone.toptviptvbox.R;
import com.toptvone.toptviptvbox.miscelleneious.chromecastfeature.ExpandedControlsActivity;
import com.toptvone.toptviptvbox.model.FavouriteM3UModel;
import com.toptvone.toptviptvbox.model.callback.SearchTMDBMoviesCallback;
import com.toptvone.toptviptvbox.model.callback.TMDBCastsCallback;
import com.toptvone.toptviptvbox.model.callback.TMDBGenreCallback;
import com.toptvone.toptviptvbox.model.callback.TMDBPersonInfoCallback;
import com.toptvone.toptviptvbox.model.callback.TMDBTrailerCallback;
import com.toptvone.toptviptvbox.model.database.DatabaseHandler;
import com.toptvone.toptviptvbox.model.database.DatabaseUpdatedStatusDBModel;
import com.toptvone.toptviptvbox.model.database.ExternalPlayerDataBase;
import com.toptvone.toptviptvbox.model.database.LiveStreamDBHandler;
import com.toptvone.toptviptvbox.model.database.SharepreferenceDBHandler;
import com.toptvone.toptviptvbox.model.pojo.ExternalPlayerModelClass;
import com.toptvone.toptviptvbox.model.pojo.TMDBCastsPojo;
import com.toptvone.toptviptvbox.model.pojo.TMDBCrewPojo;
import com.toptvone.toptviptvbox.view.adapter.CastAdapter;
import java.text.DateFormat;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import java.util.Locale;
import java.util.concurrent.TimeUnit;
import me.zhanghai.android.materialprogressbar.BuildConfig;
public class ViewDetailsTMDBActivity extends a.b.k.c implements View.OnClickListener, c.k.a.i.f.i {
    public static String f26436d;
    public static String f26437e;
    public DatabaseHandler J;
    public PopupWindow K;
    public c.k.a.h.e N;
    public CastAdapter Q;
    public c.f.a.c.d.u.d S;
    @BindView
    public AppBarLayout appbarToolbar;
    public String f26438f;
    public String f26439g;
    public SimpleDateFormat f26440h;
    public Date f26441i;
    @BindView
    public ImageView ivFavourite;
    @BindView
    public ImageView ivMovieImage;
    @BindView
    public ImageView iv_back_button;
    public Button f26442j;
    public String f26443k;
    public DateFormat f26444l;
    @BindView
    public LinearLayout llCastBox;
    @BindView
    public LinearLayout llCastBoxInfo;
    @BindView
    public LinearLayout llDirectorBox;
    @BindView
    public LinearLayout llDirectorBoxInfo;
    @BindView
    public LinearLayout llDurationBox;
    @BindView
    public LinearLayout llDurationBoxInfo;
    @BindView
    public LinearLayout llGenreBox;
    @BindView
    public LinearLayout llGenreBoxInfo;
    @BindView
    public LinearLayout llMovieInfoBox;
    @BindView
    public LinearLayout llReleasedBox;
    @BindView
    public LinearLayout llReleasedBoxInfo;
    @BindView
    public LinearLayout ll_play_button_main_layout;
    @BindView
    public LinearLayout ll_watch_trailer;
    @BindView
    public LinearLayout ll_watch_trailer_button_main_layout;
    @BindView
    public ImageView logo;
    public String f26445m;
    public TextView f26446n;
    @BindView
    public NestedScrollView nestedScrollView;
    public MenuItem f26447o;
    public Menu p;
    public Button q;
    @BindView
    public RatingBar ratingBar;
    @BindView
    public RelativeLayout rlAccountInfo;
    @BindView
    public RelativeLayout rlTransparent;
    @BindView
    public RecyclerView rvCast;
    public ProgressDialog s;
    @BindView
    public ScrollView scrollView;
    public SharedPreferences t;
    @BindView
    public Toolbar toolbar;
    @BindView
    public TextView tvCast;
    @BindView
    public TextView tvCastInfo;
    @BindView
    public TextView tvDirector;
    @BindView
    public TextView tvDirectorInfo;
    @BindView
    public TextView tvMovieDuration;
    @BindView
    public TextView tvMovieDurationInfo;
    @BindView
    public TextView tvMovieGenere;
    @BindView
    public TextView tvMovieInfo;
    @BindView
    public TextView tvMovieName;
    @BindView
    public TextView tvPlay;
    @BindView
    public TextView tvReadMore;
    @BindView
    public TextView tvReleaseDate;
    @BindView
    public TextView tvReleaseDateInfo;
    @BindView
    public TextView tvWatchTrailer;
    @BindView
    public TextView tv_genre_info;
    public SharedPreferences u;
    public LiveStreamDBHandler v;
    public Context r = this;
    public DatabaseUpdatedStatusDBModel w = new DatabaseUpdatedStatusDBModel();
    public DatabaseUpdatedStatusDBModel x = new DatabaseUpdatedStatusDBModel();
    public String y = BuildConfig.FLAVOR;
    public String z = BuildConfig.FLAVOR;
    public String A = BuildConfig.FLAVOR;
    public String B = BuildConfig.FLAVOR;
    public String C = BuildConfig.FLAVOR;
    public String D = BuildConfig.FLAVOR;
    public String E = BuildConfig.FLAVOR;
    public String F = BuildConfig.FLAVOR;
    public String G = BuildConfig.FLAVOR;
    public int H = -1;
    public String I = BuildConfig.FLAVOR;
    public String L = BuildConfig.FLAVOR;
    public Boolean M = Boolean.TRUE;
    public String O = "mobile";
    public String P = BuildConfig.FLAVOR;
    public String R = BuildConfig.FLAVOR;

    public class a implements DialogInterface.OnClickListener {
        public a() {
        }

        @Override
        public void onClick(DialogInterface dialogInterface, int i2) {
            dialogInterface.cancel();
        }
    }

    public class b implements DialogInterface.OnClickListener {
        public b() {
        }

        @Override
        public void onClick(DialogInterface dialogInterface, int i2) {
        }
    }

    public class c implements DialogInterface.OnClickListener {
        public c() {
        }

        @Override
        public void onClick(DialogInterface dialogInterface, int i2) {
            dialogInterface.cancel();
        }
    }

    public class d extends c.d.a.r.h.g<Bitmap> {
        public d() {
        }

        @Override
        public void b(Bitmap bitmap, c.d.a.r.g.c cVar) {
            ViewDetailsTMDBActivity.this.appbarToolbar.setBackground(new BitmapDrawable(bitmap));
            ViewDetailsTMDBActivity viewDetailsTMDBActivity = ViewDetailsTMDBActivity.this;
            viewDetailsTMDBActivity.rlTransparent.setBackgroundColor(viewDetailsTMDBActivity.getResources().getColor(R.color.trasparent_black));
            ViewDetailsTMDBActivity viewDetailsTMDBActivity2 = ViewDetailsTMDBActivity.this;
            viewDetailsTMDBActivity2.toolbar.setBackgroundColor(viewDetailsTMDBActivity2.getResources().getColor(R.color.trasparent_black));
        }
    }

    public class e extends c.d.a.r.h.g<Bitmap> {
        public e() {
        }

        @Override
        public void b(Bitmap bitmap, c.d.a.r.g.c cVar) {
            ViewDetailsTMDBActivity.this.appbarToolbar.setBackground(new BitmapDrawable(bitmap));
            ViewDetailsTMDBActivity viewDetailsTMDBActivity = ViewDetailsTMDBActivity.this;
            viewDetailsTMDBActivity.rlTransparent.setBackgroundColor(viewDetailsTMDBActivity.getResources().getColor(R.color.trasparent_black));
            ViewDetailsTMDBActivity viewDetailsTMDBActivity2 = ViewDetailsTMDBActivity.this;
            viewDetailsTMDBActivity2.toolbar.setBackgroundColor(viewDetailsTMDBActivity2.getResources().getColor(R.color.trasparent_black));
        }
    }

    public class f implements j0.d {
        public final ArrayList f26453a;
        public final String f26454b;

        public f(ArrayList arrayList, String str) {
            this.f26453a = arrayList;
            this.f26454b = str;
        }

        @Override
        public boolean onMenuItemClick(MenuItem menuItem) {
            ArrayList arrayList;
            try {
                if (ViewDetailsTMDBActivity.this.M.booleanValue() && (arrayList = this.f26453a) != null && arrayList.size() > 0) {
                    for (int i2 = 0; i2 < this.f26453a.size(); i2++) {
                        if (menuItem.getItemId() == i2) {
                            if (menuItem.getItemId() == 0) {
                                c.k.a.g.n.e.V(ViewDetailsTMDBActivity.this.r, this.f26454b, ViewDetailsTMDBActivity.this.H, ViewDetailsTMDBActivity.this.D, ViewDetailsTMDBActivity.this.E, ViewDetailsTMDBActivity.this.F, ViewDetailsTMDBActivity.this.A, ViewDetailsTMDBActivity.this.G, 0);
                            } else {
                                Intent intent = new Intent(ViewDetailsTMDBActivity.this.r, PlayExternalPlayerActivity.class);
                                intent.putExtra("url", ViewDetailsTMDBActivity.this.G);
                                intent.putExtra("app_name", ((ExternalPlayerModelClass) this.f26453a.get(i2)).a());
                                intent.putExtra("packagename", ((ExternalPlayerModelClass) this.f26453a.get(i2)).b());
                                ViewDetailsTMDBActivity.this.r.startActivity(intent);
                            }
                        }
                    }
                }
            } catch (Exception unused) {
            }
            return false;
        }
    }

    public class g implements j0.c {
        public g() {
        }

        @Override
        public void a(j0 j0Var) {
        }
    }

    public class h implements View.OnClickListener {
        public h() {
        }

        @Override
        public void onClick(View view) {
            ViewDetailsTMDBActivity.this.K.dismiss();
        }
    }

    public class i implements View.OnClickListener {
        public i() {
        }

        @Override
        public void onClick(View view) {
            ViewDetailsTMDBActivity.this.K.dismiss();
        }
    }

    public class j implements View.OnClickListener {
        public j() {
        }

        @Override
        public void onClick(View view) {
            ViewDetailsTMDBActivity.this.K.dismiss();
        }
    }

    public class k implements View.OnClickListener {
        public k() {
        }

        @Override
        public void onClick(View view) {
            c.k.a.g.n.e.a(ViewDetailsTMDBActivity.this.r);
        }
    }

    public class l implements View.OnClickListener {
        public l() {
        }

        @Override
        public void onClick(View view) {
            ViewDetailsTMDBActivity.this.onBackPressed();
        }
    }

    public class m implements View.OnClickListener {
        public final Context f26462b;

        public m(Context context) {
            this.f26462b = context;
        }

        @Override
        public void onClick(View view) {
            if (ViewDetailsTMDBActivity.this.v.V(ViewDetailsTMDBActivity.this.G, SharepreferenceDBHandler.A(this.f26462b)).size() > 0) {
                ViewDetailsTMDBActivity.this.L0();
            } else {
                ViewDetailsTMDBActivity.this.E0();
            }
        }
    }

    public class n extends c.d.a.r.h.g<Bitmap> {
        public n() {
        }

        @Override
        public void b(Bitmap bitmap, c.d.a.r.g.c cVar) {
            ViewDetailsTMDBActivity.this.ivMovieImage.setBackground(new BitmapDrawable(bitmap));
        }
    }

    public class o implements DialogInterface.OnClickListener {
        public o() {
        }

        @Override
        public void onClick(DialogInterface dialogInterface, int i2) {
            dialogInterface.dismiss();
        }
    }

    public class p implements DialogInterface.OnClickListener {
        public p() {
        }

        @Override
        public void onClick(DialogInterface dialogInterface, int i2) {
            c.k.a.g.n.e.N(ViewDetailsTMDBActivity.this.r);
        }
    }

    public class q implements DialogInterface.OnClickListener {
        public q() {
        }

        @Override
        public void onClick(DialogInterface dialogInterface, int i2) {
            c.k.a.g.n.e.M(ViewDetailsTMDBActivity.this.r);
        }
    }

    public class r implements View.OnFocusChangeListener {
        public final View f26468b;

        public r(View view) {
            this.f26468b = view;
        }

        public final void a(float f2) {
            ObjectAnimator ofFloat = ObjectAnimator.ofFloat(this.f26468b, "scaleX", f2);
            ofFloat.setDuration(150L);
            ofFloat.start();
        }

        public final void b(float f2) {
            ObjectAnimator ofFloat = ObjectAnimator.ofFloat(this.f26468b, "scaleY", f2);
            ofFloat.setDuration(150L);
            ofFloat.start();
        }

        @Override
        @SuppressLint({"ResourceType"})
        public void onFocusChange(View view, boolean z) {
            float f2;
            int i2;
            LinearLayout linearLayout;
            if (z) {
                f2 = z ? 1.05f : 1.0f;
                Log.e("id is", BuildConfig.FLAVOR + this.f26468b.getTag());
                View view2 = this.f26468b;
                if (view2 == null || view2.getTag() == null) {
                    return;
                }
                boolean equals = this.f26468b.getTag().equals("1");
                i2 = R.drawable.blue_btn_effect;
                if (equals) {
                    a(f2);
                    b(f2);
                    linearLayout = ViewDetailsTMDBActivity.this.ll_play_button_main_layout;
                } else if (this.f26468b.getTag().equals("2")) {
                    a(f2);
                    b(f2);
                    this.f26468b.setBackgroundResource(R.drawable.blue_btn_effect);
                    return;
                } else if (!this.f26468b.getTag().equals("5")) {
                    if (!this.f26468b.getTag().equals("8")) {
                        a(1.15f);
                        b(1.15f);
                        return;
                    }
                    a(f2);
                    b(f2);
                    ViewDetailsTMDBActivity.this.q.setBackgroundResource(R.drawable.back_btn_effect);
                    return;
                } else {
                    a(f2);
                    b(f2);
                    linearLayout = ViewDetailsTMDBActivity.this.ll_watch_trailer_button_main_layout;
                }
            } else if (z) {
                return;
            } else {
                f2 = z ? 1.09f : 1.0f;
                a(f2);
                b(f2);
                View view3 = this.f26468b;
                if (view3 == null || view3.getTag() == null) {
                    return;
                }
                boolean equals2 = this.f26468b.getTag().equals("1");
                i2 = R.drawable.rounded_edge_2;
                if (!equals2) {
                    if (this.f26468b.getTag().equals("3")) {
                        this.f26468b.setBackgroundResource(R.drawable.black_button_dark);
                        return;
                    }
                    if (!this.f26468b.getTag().equals("5")) {
                        if (this.f26468b.getTag() == null || !this.f26468b.getTag().equals("8")) {
                            return;
                        }
                        ViewDetailsTMDBActivity.this.q.setBackgroundResource(R.drawable.black_button_dark);
                        return;
                    }
                    linearLayout = ViewDetailsTMDBActivity.this.ll_watch_trailer_button_main_layout;
                }
                linearLayout = ViewDetailsTMDBActivity.this.ll_play_button_main_layout;
            }
            linearLayout.setBackgroundResource(i2);
        }
    }

    public static long G0(SimpleDateFormat simpleDateFormat, String str, String str2) {
        try {
            return TimeUnit.DAYS.convert(simpleDateFormat.parse(str2).getTime() - simpleDateFormat.parse(str).getTime(), TimeUnit.MILLISECONDS);
        } catch (Exception e2) {
            e2.printStackTrace();
            return 0L;
        }
    }

    public static String H0(Context context) {
        return String.valueOf(context.getApplicationInfo().loadLabel(context.getPackageManager()));
    }

    public final void E0() {
        FavouriteM3UModel favouriteM3UModel = new FavouriteM3UModel();
        favouriteM3UModel.h(this.G);
        favouriteM3UModel.i(SharepreferenceDBHandler.A(this.r));
        favouriteM3UModel.g(this.A);
        favouriteM3UModel.e(this.I);
        this.v.R(favouriteM3UModel);
        int i2 = Build.VERSION.SDK_INT;
        if (i2 <= 21) {
            this.ivFavourite.setImageResource(R.drawable.fav_heart_red);
        }
        if (i2 >= 21) {
            this.ivFavourite.setImageDrawable(this.r.getResources().getDrawable(R.drawable.fav_heart_red, null));
        }
    }

    public final void F0() {
        Window window = getWindow();
        int i2 = Build.VERSION.SDK_INT;
        if (i2 >= 19) {
            window.clearFlags(67108864);
        }
        if (i2 >= 21) {
            window.addFlags(Integer.MIN_VALUE);
        }
        if (i2 >= 21) {
            window.setStatusBarColor(a.i.i.b.d(this, R.color.colorPrimaryDark));
        }
    }

    @SuppressLint({"InlinedApi"})
    public void I0() {
        getWindow().getDecorView().setSystemUiVisibility(5894);
    }

    public final void J0() {
        this.v = new LiveStreamDBHandler(this.r);
        this.J = new DatabaseHandler(this.r);
        SharedPreferences sharedPreferences = getSharedPreferences("loginPrefs", 0);
        this.t = sharedPreferences;
        String string = sharedPreferences.getString("username", BuildConfig.FLAVOR);
        String string2 = this.t.getString("password", BuildConfig.FLAVOR);
        if (string.isEmpty() || string2.isEmpty()) {
            startActivity(new Intent(this, LoginActivity.class));
            overridePendingTransition(R.anim.fade_out, R.anim.fade_in);
        } else {
            N0(this.r, string, string2);
        }
        this.logo.setOnClickListener(new k());
        this.iv_back_button.setOnClickListener(new l());
    }

    @Override
    public void K(TMDBPersonInfoCallback tMDBPersonInfoCallback) {
    }

    public final void K0(ViewDetailsTMDBActivity viewDetailsTMDBActivity) {
        View inflate = ((LayoutInflater) viewDetailsTMDBActivity.getSystemService("layout_inflater")).inflate(R.layout.layout_movie_trailer, (RelativeLayout) viewDetailsTMDBActivity.findViewById(R.id.rl_password_verification));
        PopupWindow popupWindow = new PopupWindow(viewDetailsTMDBActivity);
        this.K = popupWindow;
        popupWindow.setContentView(inflate);
        this.K.setWidth(-1);
        this.K.setHeight(-1);
        this.K.setFocusable(true);
        this.K.setBackgroundDrawable(new BitmapDrawable());
        this.K.showAtLocation(inflate, 17, 0, 0);
        this.q = (Button) inflate.findViewById(R.id.bt_save_password);
        this.f26442j = (Button) inflate.findViewById(R.id.bt_close);
        Button button = this.q;
        if (button != null) {
            button.setOnFocusChangeListener(new r(button));
        }
        Button button2 = this.f26442j;
        if (button2 != null) {
            button2.setOnFocusChangeListener(new r(button2));
        }
        this.f26442j.setOnClickListener(new h());
        this.q.setOnClickListener(new i());
    }

    public final void L0() {
        this.v.J0(this.G, SharepreferenceDBHandler.A(this.r));
        int i2 = Build.VERSION.SDK_INT;
        if (i2 <= 21) {
            this.ivFavourite.setImageResource(R.drawable.fav_heart_white);
        }
        if (i2 >= 21) {
            this.ivFavourite.setImageDrawable(this.r.getResources().getDrawable(R.drawable.fav_heart_white, null));
        }
    }

    public final void M0(ViewDetailsTMDBActivity viewDetailsTMDBActivity) {
        View inflate = ((LayoutInflater) viewDetailsTMDBActivity.getSystemService("layout_inflater")).inflate(R.layout.layout_cast_details, (RelativeLayout) viewDetailsTMDBActivity.findViewById(R.id.rl_password_verification));
        TextView textView = (TextView) inflate.findViewById(R.id.tv_casts_info_popup);
        this.f26446n = textView;
        textView.setText(this.f26443k);
        PopupWindow popupWindow = new PopupWindow(viewDetailsTMDBActivity);
        this.K = popupWindow;
        popupWindow.setContentView(inflate);
        this.K.setWidth(-1);
        this.K.setHeight(-1);
        this.K.setFocusable(true);
        this.K.showAtLocation(inflate, 17, 0, 0);
        Button button = (Button) inflate.findViewById(R.id.bt_close);
        this.f26442j = button;
        if (button != null) {
            button.setOnFocusChangeListener(new r(button));
        }
        this.f26442j.setOnClickListener(new j());
    }

    public final void N0(Context context, String str, String str2) {
        int i2;
        String str3;
        String str4;
        String str5;
        TextView textView;
        this.N = new c.k.a.h.e(this, context);
        if (this.O.equals("mobile")) {
            this.nestedScrollView.setVisibility(0);
        } else {
            this.scrollView.setVisibility(0);
        }
        Intent intent = getIntent();
        if (intent != null) {
            try {
                this.H = Integer.parseInt(intent.getStringExtra(c.k.a.g.n.a.y));
            } catch (NumberFormatException unused) {
                this.H = -1;
            }
            this.A = intent.getStringExtra("movie");
            this.B = intent.getStringExtra("selectedPlayer");
            this.C = intent.getStringExtra("movie_icon");
            this.D = intent.getStringExtra("streamType");
            this.E = intent.getStringExtra("containerExtension");
            this.I = intent.getStringExtra("categoryID");
            this.F = intent.getStringExtra("num");
            String stringExtra = intent.getStringExtra("videoURL");
            this.G = stringExtra;
            if (this.v.V(stringExtra, SharepreferenceDBHandler.A(context)).size() > 0) {
                int i3 = Build.VERSION.SDK_INT;
                i2 = R.drawable.fav_heart_red;
                if (i3 <= 21) {
                    this.ivFavourite.setImageResource(R.drawable.fav_heart_red);
                }
            } else {
                int i4 = Build.VERSION.SDK_INT;
                i2 = R.drawable.fav_heart_white;
                if (i4 <= 21) {
                    this.ivFavourite.setImageResource(R.drawable.fav_heart_white);
                }
            }
            ImageView imageView = this.ivFavourite;
            if (imageView != null) {
                imageView.setOnFocusChangeListener(new r(imageView));
                this.ivFavourite.setOnClickListener(new m(context));
            }
            if (context != null) {
                try {
                    String str6 = this.C;
                    if (str6 != null && !str6.isEmpty()) {
                        c.d.a.g.u(getApplicationContext()).q(this.C).J().m(new n());
                    }
                } catch (Exception unused2) {
                }
            }
            String str7 = this.A;
            if (str7 != null && (textView = this.tvMovieName) != null) {
                textView.setText(str7);
            }
            String str8 = this.A;
            if (str8 == null || !str8.contains("(") || (str5 = this.A) == null || !str5.contains(")")) {
                String str9 = this.A;
                if (str9 == null || !str9.contains("[") || (str3 = this.A) == null || !str3.contains("]")) {
                    this.N.e(this.A);
                    return;
                }
                str4 = this.A.split("\\[")[0];
            } else {
                str4 = this.A.split("\\(")[0];
            }
            this.P = str4;
            this.N.e(str4);
        }
    }

    @Override
    public void P(TMDBCastsCallback tMDBCastsCallback) {
        if (tMDBCastsCallback != null) {
            try {
                if (tMDBCastsCallback.a() != null && tMDBCastsCallback.a().size() > 0) {
                    this.rvCast.setLayoutManager(new LinearLayoutManager(this, 0, false));
                    this.rvCast.setItemAnimator(new a.y.e.c());
                    CastAdapter castAdapter = new CastAdapter(tMDBCastsCallback.a(), this.r, true, this.R);
                    this.Q = castAdapter;
                    this.rvCast.setAdapter(castAdapter);
                    this.rvCast.setVisibility(0);
                }
            } catch (Exception unused) {
                return;
            }
        }
        this.rvCast.setVisibility(8);
    }

    @Override
    public void T(TMDBTrailerCallback tMDBTrailerCallback) {
        LinearLayout linearLayout;
        if (tMDBTrailerCallback == null || tMDBTrailerCallback.a() == null || tMDBTrailerCallback.a().size() <= 0) {
            return;
        }
        int i2 = 0;
        for (int i3 = 0; i3 < tMDBTrailerCallback.a().size(); i3++) {
            if (tMDBTrailerCallback.a().get(i3).b().equals("Trailer")) {
                String a2 = tMDBTrailerCallback.a().get(i3).a();
                this.L = a2;
                if (a2 == null || a2.isEmpty()) {
                    TextView textView = this.tvWatchTrailer;
                    i2 = 8;
                    if (textView != null) {
                        textView.setVisibility(8);
                    }
                    linearLayout = this.ll_watch_trailer;
                    if (linearLayout == null) {
                        return;
                    }
                } else {
                    TextView textView2 = this.tvWatchTrailer;
                    if (textView2 != null) {
                        textView2.setVisibility(0);
                    }
                    linearLayout = this.ll_watch_trailer;
                    if (linearLayout == null) {
                        return;
                    }
                }
                linearLayout.setVisibility(i2);
                return;
            }
        }
    }

    @Override
    public void X(TMDBGenreCallback tMDBGenreCallback) {
        TextView textView;
        if (tMDBGenreCallback == null || tMDBGenreCallback.a() == null || tMDBGenreCallback.a().size() <= 0) {
            LinearLayout linearLayout = this.llGenreBox;
            if (linearLayout != null) {
                linearLayout.setVisibility(0);
            }
            LinearLayout linearLayout2 = this.llGenreBoxInfo;
            if (linearLayout2 != null) {
                linearLayout2.setVisibility(0);
            }
            textView = this.tv_genre_info;
        } else {
            String str = BuildConfig.FLAVOR;
            for (int i2 = 0; i2 < tMDBGenreCallback.a().size(); i2++) {
                str = str + ((c.f.d.w.h) tMDBGenreCallback.a().get(i2)).get("name").toString() + " / ";
            }
            String substring = str.substring(0, str.lastIndexOf(47));
            this.f26445m = substring;
            if (this.llGenreBox == null || this.llGenreBoxInfo == null || this.tv_genre_info == null || substring.isEmpty()) {
                LinearLayout linearLayout3 = this.llGenreBox;
                if (linearLayout3 != null) {
                    linearLayout3.setVisibility(0);
                }
                LinearLayout linearLayout4 = this.llGenreBoxInfo;
                if (linearLayout4 != null) {
                    linearLayout4.setVisibility(0);
                }
                textView = this.tv_genre_info;
            } else {
                this.llGenreBox.setVisibility(0);
                this.llGenreBoxInfo.setVisibility(0);
                if (substring.length() > 40) {
                }
                this.tv_genre_info.setText(substring);
            }
        }
        if (tMDBGenreCallback == null || tMDBGenreCallback.b() == null) {
            return;
        }
        try {
            int round = (int) Math.round(((Double) tMDBGenreCallback.b()).doubleValue() * 60.0d);
            String format = String.format("%02d:%02d:%02d", Integer.valueOf(round / 3600), Integer.valueOf((round % 3600) / 60), Integer.valueOf(round % 60));
            this.llDurationBox.setVisibility(0);
            this.llDurationBoxInfo.setVisibility(0);
            float f2 = round;
            int i3 = (int) (f2 / 3600.0f);
            try {
                int round2 = Math.round((f2 % 3600.0f) / 60.0f);
                if (i3 == 0) {
                    this.tvMovieDurationInfo.setText(round2 + "m");
                } else {
                    this.tvMovieDurationInfo.setText(i3 + "h " + round2 + "m");
                }
            } catch (Exception unused) {
                this.tvMovieDurationInfo.setText(format);
            }
        } catch (Exception unused2) {
            LinearLayout linearLayout5 = this.llDurationBox;
            if (linearLayout5 != null) {
                linearLayout5.setVisibility(0);
            }
            LinearLayout linearLayout6 = this.llDurationBoxInfo;
            if (linearLayout6 != null) {
                linearLayout6.setVisibility(0);
            }
            TextView textView2 = this.tvMovieDurationInfo;
            if (textView2 != null) {
                textView2.setText("N/A");
            }
        }
    }

    @Override
    public void a() {
    }

    @Override
    public void b() {
        ProgressDialog progressDialog = this.s;
        if (progressDialog != null) {
            progressDialog.dismiss();
        }
    }

    @Override
    public void c(String str) {
    }

    @Override
    public boolean dispatchKeyEvent(KeyEvent keyEvent) {
        int keyCode = keyEvent.getKeyCode();
        return keyCode == 82 ? keyEvent.getAction() == 0 ? onKeyDown(keyCode, keyEvent) : onKeyUp(keyCode, keyEvent) : super.dispatchKeyEvent(keyEvent);
    }

    @Override
    public void onBackPressed() {
        super.onBackPressed();
        overridePendingTransition(R.anim.fade_out, R.anim.fade_in);
    }

    @Override
    public void onClick(View view) {
        if (view.getId() != R.id.tv_header_title) {
            return;
        }
        startActivity(new Intent(this, NewDashboardActivity.class));
    }

    @Override
    public void onCreate(Bundle bundle) {
        super.onCreate(bundle);
        I0();
        setContentView(R.layout.activity_view_details);
        ButterKnife.a(this);
        overridePendingTransition(R.anim.fade_out, R.anim.fade_in);
        AppBarLayout appBarLayout = this.appbarToolbar;
        if (appBarLayout != null) {
            appBarLayout.setBackground(getResources().getDrawable(R.drawable.dashboard_background));
        }
        this.O = new c.k.a.i.d.a.a(this.r).z().equals(c.k.a.g.n.a.s0) ? "tv" : "mobile";
        F0();
        this.f26441i = new Date();
        TextView textView = this.tvPlay;
        if (textView != null) {
            textView.setOnFocusChangeListener(new r(textView));
            this.tvPlay.requestFocus();
            this.tvPlay.setFocusable(true);
        }
        f26436d = H0(this.r);
        Locale locale = Locale.US;
        this.f26444l = new SimpleDateFormat("yyyy/MM/dd HH:mm:ss", locale);
        TextView textView2 = this.tvReadMore;
        if (textView2 != null) {
            textView2.setOnFocusChangeListener(new r(textView2));
        }
        this.f26439g = c.k.a.g.n.e.m0(c.k.a.i.d.c.a.e.d());
        f26437e = getApplicationContext().getPackageName();
        TextView textView3 = this.tvWatchTrailer;
        if (textView3 != null) {
            textView3.setOnFocusChangeListener(new r(textView3));
        }
        this.f26438f = c.k.a.g.n.e.m0(c.k.a.i.d.c.a.a.a());
        this.f26440h = new SimpleDateFormat("yyyy/MM/dd HH:mm:ss", locale);
        getWindow().setFlags(1024, 1024);
        p0((Toolbar) findViewById(R.id.toolbar));
        J0();
    }

    @Override
    public boolean onCreateOptionsMenu(Menu menu) {
        super.onCreateOptionsMenu(menu);
        this.toolbar.x(R.menu.menu_text_icon);
        this.p = menu;
        this.f26447o = menu.getItem(1).getSubMenu().findItem(R.id.empty);
        TypedValue typedValue = new TypedValue();
        if (getTheme().resolveAttribute(16843499, typedValue, true)) {
            TypedValue.complexToDimensionPixelSize(typedValue.data, getResources().getDisplayMetrics());
        }
        for (int i2 = 0; i2 < this.toolbar.getChildCount(); i2++) {
            if (this.toolbar.getChildAt(i2) instanceof ActionMenuView) {
                ((Toolbar.e) this.toolbar.getChildAt(i2).getLayoutParams()).f132a = 16;
            }
        }
        return true;
    }

    @Override
    public boolean onKeyUp(int i2, KeyEvent keyEvent) {
        if (i2 != 82) {
            return super.onKeyUp(i2, keyEvent);
        }
        Menu menu = this.p;
        if (menu != null) {
            menu.performIdentifierAction(R.id.empty, 0);
            return true;
        }
        return true;
    }

    @Override
    public boolean onOptionsItemSelected(MenuItem menuItem) {
        Context context;
        this.f26447o = menuItem;
        int itemId = menuItem.getItemId();
        if (itemId == R.id.nav_home) {
            startActivity(new Intent(this, NewDashboardActivity.class));
            finish();
        }
        if (itemId == R.id.nav_settings) {
            startActivity(new Intent(this, SettingsActivity.class));
        }
        if (itemId == R.id.action_logout && (context = this.r) != null) {
            new b.a(context, R.style.AlertDialogCustom).setTitle(getResources().getString(R.string.logout_title)).f(getResources().getString(R.string.logout_message)).j(getResources().getString(R.string.yes), new p()).g(getResources().getString(R.string.no), new o()).n();
        }
        if (itemId == R.id.menu_load_channels_vod) {
            b.a aVar = new b.a(this);
            aVar.setTitle(this.r.getResources().getString(R.string.confirm_to_refresh));
            aVar.f(this.r.getResources().getString(R.string.do_you_want_toproceed));
            aVar.d(R.drawable.questionmark);
            aVar.j(this.r.getResources().getString(R.string.yes), new q());
            aVar.g(this.r.getResources().getString(R.string.no), new a());
            aVar.n();
        }
        if (itemId == R.id.menu_load_tv_guide) {
            b.a aVar2 = new b.a(this);
            aVar2.setTitle(this.r.getResources().getString(R.string.confirm_to_refresh));
            aVar2.f(this.r.getResources().getString(R.string.do_you_want_toproceed));
            aVar2.d(R.drawable.questionmark);
            aVar2.j(this.r.getResources().getString(R.string.yes), new b());
            aVar2.g(this.r.getResources().getString(R.string.no), new c());
            aVar2.n();
        }
        return super.onOptionsItemSelected(menuItem);
    }

    @Override
    public void onResume() {
        I0();
        super.onResume();
        c.k.a.g.n.e.f(this.r);
        getWindow().setFlags(1024, 1024);
        SharedPreferences sharedPreferences = getSharedPreferences("loginPrefs", 0);
        this.t = sharedPreferences;
        if (sharedPreferences.getString("username", BuildConfig.FLAVOR).equals(BuildConfig.FLAVOR) && this.t.getString("password", BuildConfig.FLAVOR).equals(BuildConfig.FLAVOR)) {
            startActivity(new Intent(this, LoginActivity.class));
        } else if (this.r != null) {
            b();
        }
    }

    @OnClick
    public void onViewClicked(View view) {
        String str;
        String str2;
        switch (view.getId()) {
            case R.id.iv_movie_image:
            case R.id.tv_play:
                SharedPreferences sharedPreferences = this.r.getSharedPreferences("selectedPlayer", 0);
                this.u = sharedPreferences;
                String str3 = BuildConfig.FLAVOR;
                String string = sharedPreferences.getString("selectedPlayer", BuildConfig.FLAVOR);
                SimpleDateFormat simpleDateFormat = this.f26440h;
                if (G0(simpleDateFormat, simpleDateFormat.format(new Date(c.k.a.i.d.c.a.f.a(this.r))), this.f26444l.format(this.f26441i)) >= c.k.a.i.d.c.a.d.p() && (str = this.f26438f) != null && this.f26439g != null && (!f26436d.equals(str) || (this.f26438f != null && (str2 = this.f26439g) != null && !f26437e.equals(str2)))) {
                    this.M = Boolean.FALSE;
                }
                if (this.M.booleanValue()) {
                    try {
                        c.f.a.c.d.u.d c2 = c.f.a.c.d.u.b.e(this.r).c().c();
                        this.S = c2;
                        if (c2 != null && c2.c()) {
                            c.f.a.c.d.u.d dVar = this.S;
                            if (dVar != null && dVar.p() != null && this.S.p().j() != null && this.S.p().j().K() != null) {
                                str3 = this.S.p().j().K();
                            }
                            if (str3.contains(this.G)) {
                                this.r.startActivity(new Intent(this.r, ExpandedControlsActivity.class));
                                return;
                            } else {
                                c.k.a.g.m.a.c(0, true, c.k.a.g.m.a.a(this.A, BuildConfig.FLAVOR, BuildConfig.FLAVOR, 0, this.G, "videos/mp4", this.C, BuildConfig.FLAVOR, null), this.S, this.r);
                                return;
                            }
                        }
                        new ArrayList();
                        ArrayList arrayList = new ArrayList();
                        j0 j0Var = new j0(this, view);
                        j0Var.c().inflate(R.menu.menu_players_hp, j0Var.b());
                        ArrayList<ExternalPlayerModelClass> l2 = new ExternalPlayerDataBase(this.r).l();
                        if (l2 != null) {
                            try {
                                if (l2.size() > 0) {
                                    j0Var.b().add(0, 0, 0, this.r.getResources().getString(R.string.nav_play));
                                    ExternalPlayerModelClass externalPlayerModelClass = new ExternalPlayerModelClass();
                                    externalPlayerModelClass.e(0);
                                    externalPlayerModelClass.d(this.r.getResources().getString(R.string.play_with));
                                    arrayList.add(externalPlayerModelClass);
                                    int i2 = 0;
                                    while (i2 < l2.size()) {
                                        Menu b2 = j0Var.b();
                                        int i3 = i2 + 1;
                                        b2.add(0, i3, 0, this.r.getResources().getString(R.string.play_with) + " " + l2.get(i2).a());
                                        arrayList.add(l2.get(i2));
                                        i2 = i3;
                                    }
                                    j0Var.f(new f(arrayList, string));
                                    j0Var.e(new g());
                                    j0Var.g();
                                    return;
                                }
                            } catch (Exception unused) {
                                return;
                            }
                        }
                        if (this.M.booleanValue()) {
                            c.k.a.g.n.e.V(this.r, string, this.H, this.D, this.E, this.F, this.A, this.G, 0);
                            return;
                        }
                        return;
                    } catch (Exception unused2) {
                        if (this.M.booleanValue()) {
                            c.k.a.g.n.e.V(this.r, string, this.H, this.D, this.E, this.F, this.A, this.G, 0);
                            return;
                        }
                        return;
                    }
                }
                return;
            case R.id.tv_readmore:
                M0(this);
                return;
            case R.id.tv_watch_trailer:
                String str4 = this.L;
                if (str4 == null || str4.isEmpty()) {
                    K0(this);
                    return;
                } else {
                    startActivity(new Intent(this, YouTubePlayerActivity.class).putExtra("you_tube_trailer", this.L));
                    return;
                }
            default:
                return;
        }
    }

    @Override
    public void onWindowFocusChanged(boolean z) {
        super.onWindowFocusChanged(z);
        I0();
    }

    @Override
    public void p(TMDBCastsCallback tMDBCastsCallback) {
        TextView textView;
        TextView textView2;
        String str = BuildConfig.FLAVOR;
        if (tMDBCastsCallback == null || tMDBCastsCallback.a() == null || tMDBCastsCallback.a().size() <= 0) {
            LinearLayout linearLayout = this.llCastBox;
            if (linearLayout != null) {
                linearLayout.setVisibility(0);
            }
            LinearLayout linearLayout2 = this.llCastBoxInfo;
            if (linearLayout2 != null) {
                linearLayout2.setVisibility(0);
            }
            TextView textView3 = this.tvReadMore;
            if (textView3 != null) {
                textView3.setVisibility(8);
            }
            textView = this.tvCastInfo;
        } else {
            List<TMDBCastsPojo> a2 = tMDBCastsCallback.a();
            if (a2 != null) {
                String str2 = BuildConfig.FLAVOR;
                for (int i2 = 0; i2 < a2.size(); i2++) {
                    str2 = str2 + a2.get(i2).b() + " / ";
                }
                String substring = str2.substring(0, str2.lastIndexOf(47));
                this.f26443k = substring;
                if (this.llCastBox == null || this.llCastBoxInfo == null || this.tvCastInfo == null || substring.isEmpty()) {
                    LinearLayout linearLayout3 = this.llCastBox;
                    if (linearLayout3 != null) {
                        linearLayout3.setVisibility(0);
                    }
                    LinearLayout linearLayout4 = this.llCastBoxInfo;
                    if (linearLayout4 != null) {
                        linearLayout4.setVisibility(0);
                    }
                    TextView textView4 = this.tvReadMore;
                    if (textView4 != null) {
                        textView4.setVisibility(8);
                    }
                    textView = this.tvCastInfo;
                } else {
                    this.llCastBox.setVisibility(0);
                    this.llCastBoxInfo.setVisibility(0);
                    if (substring.length() > 150) {
                        this.tvCastInfo.setText(substring);
                        this.tvReadMore.setVisibility(0);
                    } else {
                        this.tvCastInfo.setText(substring);
                        this.tvReadMore.setVisibility(8);
                    }
                }
            } else {
                LinearLayout linearLayout5 = this.llCastBox;
                if (linearLayout5 != null) {
                    linearLayout5.setVisibility(0);
                }
                LinearLayout linearLayout6 = this.llCastBoxInfo;
                if (linearLayout6 != null) {
                    linearLayout6.setVisibility(0);
                }
                TextView textView5 = this.tvReadMore;
                if (textView5 != null) {
                    textView5.setVisibility(8);
                }
                textView = this.tvCastInfo;
            }
        }
        if (tMDBCastsCallback == null || tMDBCastsCallback.b() == null || tMDBCastsCallback.b().size() <= 0) {
            LinearLayout linearLayout7 = this.llDirectorBox;
            if (linearLayout7 != null) {
                linearLayout7.setVisibility(0);
            }
            LinearLayout linearLayout8 = this.llDirectorBoxInfo;
            if (linearLayout8 != null) {
                linearLayout8.setVisibility(0);
            }
            textView2 = this.tvDirectorInfo;
            if (textView2 == null) {
                return;
            }
        } else {
            List<TMDBCrewPojo> b2 = tMDBCastsCallback.b();
            if (b2 != null) {
                int i3 = 0;
                while (true) {
                    if (i3 >= b2.size()) {
                        break;
                    } else if (b2.get(i3).a().equals("Director")) {
                        str = b2.get(i3).b();
                        break;
                    } else {
                        i3++;
                    }
                }
                if (this.tvDirectorInfo != null && this.llDirectorBoxInfo != null && this.llDirectorBox != null && str != null && !str.isEmpty() && !str.equals("n/A")) {
                    this.llDirectorBox.setVisibility(0);
                    this.llDirectorBoxInfo.setVisibility(0);
                    this.tvDirectorInfo.setText(str);
                    return;
                }
                LinearLayout linearLayout9 = this.llDirectorBox;
                if (linearLayout9 != null) {
                    linearLayout9.setVisibility(0);
                }
                LinearLayout linearLayout10 = this.llDirectorBoxInfo;
                if (linearLayout10 != null) {
                    linearLayout10.setVisibility(0);
                }
                textView2 = this.tvDirectorInfo;
                if (textView2 == null) {
                    return;
                }
            } else {
                LinearLayout linearLayout11 = this.llDirectorBox;
                if (linearLayout11 != null) {
                    linearLayout11.setVisibility(0);
                }
                LinearLayout linearLayout12 = this.llDirectorBoxInfo;
                if (linearLayout12 != null) {
                    linearLayout12.setVisibility(0);
                }
                textView2 = this.tvDirectorInfo;
                if (textView2 == null) {
                    return;
                }
            }
        }
        textView2.setText("N/A");
    }

    @Override
    public void r(SearchTMDBMoviesCallback searchTMDBMoviesCallback) {
        int i2;
        String str;
        TextView textView;
        TextView textView2;
        String str2;
        boolean z = true;
        if (searchTMDBMoviesCallback == null || searchTMDBMoviesCallback.b() == null || !searchTMDBMoviesCallback.b().equals(1) || searchTMDBMoviesCallback.a() == null || searchTMDBMoviesCallback.a().get(0) == null) {
            if (searchTMDBMoviesCallback != null && searchTMDBMoviesCallback.b() != null && searchTMDBMoviesCallback.b().intValue() > 1 && searchTMDBMoviesCallback.a() != null) {
                String trim = (!this.P.equals(BuildConfig.FLAVOR) ? this.P : this.A).trim();
                i2 = 0;
                while (i2 < searchTMDBMoviesCallback.a().size()) {
                    if (searchTMDBMoviesCallback.a().get(i2).f().equals(trim) || searchTMDBMoviesCallback.a().get(i2).c().equals(trim)) {
                        break;
                    }
                    i2++;
                }
            }
            z = false;
            i2 = 0;
            if (z) {
                try {
                    int intValue = searchTMDBMoviesCallback.a().get(i2).b().intValue();
                    this.N.b(intValue);
                    this.N.d(intValue);
                    this.N.g(intValue);
                    this.N.c(intValue);
                    String e2 = searchTMDBMoviesCallback.a().get(i2).e();
                    Double g2 = searchTMDBMoviesCallback.a().get(i2).g();
                    String d2 = searchTMDBMoviesCallback.a().get(i2).d();
                    String a2 = searchTMDBMoviesCallback.a().get(i2).a();
                    if (new c.k.a.i.d.a.a(this.r).z().equals(c.k.a.g.n.a.s0)) {
                        str = "https://image.tmdb.org/t/p/w1280/" + a2;
                    } else {
                        str = "https://image.tmdb.org/t/p/w500/" + a2;
                    }
                    if (this.appbarToolbar != null && a2 != null) {
                        this.R = str;
                        c.d.a.g.u(getApplicationContext()).q(str).J().m(new e());
                    }
                    if (this.llReleasedBox == null || this.llReleasedBoxInfo == null || this.tvReleaseDateInfo == null || e2 == null || e2.isEmpty() || e2.equals("n/A")) {
                        LinearLayout linearLayout = this.llReleasedBox;
                        if (linearLayout != null) {
                            linearLayout.setVisibility(0);
                        }
                        LinearLayout linearLayout2 = this.llReleasedBoxInfo;
                        if (linearLayout2 != null) {
                            linearLayout2.setVisibility(0);
                        }
                        TextView textView3 = this.tvReleaseDateInfo;
                        if (textView3 != null) {
                            textView3.setText("N/A");
                        }
                    } else {
                        this.llReleasedBox.setVisibility(0);
                        this.llReleasedBoxInfo.setVisibility(0);
                        this.tvReleaseDateInfo.setText(e2);
                    }
                    if (this.ratingBar != null && g2 != null && !g2.equals("n/A")) {
                        this.ratingBar.setVisibility(0);
                        try {
                            this.ratingBar.setRating(Float.parseFloat(String.valueOf(g2)) / 2.0f);
                        } catch (NumberFormatException unused) {
                            this.ratingBar.setRating(0.0f);
                        }
                    }
                    if (this.tvMovieInfo != null && d2 != null && !d2.isEmpty() && !d2.equals("n/A")) {
                        this.tvMovieInfo.setText(d2);
                        return;
                    }
                    TextView textView4 = this.tvMovieInfo;
                    if (textView4 != null) {
                        textView4.setVisibility(8);
                        return;
                    }
                    return;
                } catch (Exception unused2) {
                    return;
                }
            }
            String str3 = this.A;
            if (str3 != null && (textView2 = this.tvMovieName) != null) {
                textView2.setText(str3);
            }
            LinearLayout linearLayout3 = this.llDurationBox;
            if (linearLayout3 != null) {
                linearLayout3.setVisibility(0);
            }
            LinearLayout linearLayout4 = this.llDurationBoxInfo;
            if (linearLayout4 != null) {
                linearLayout4.setVisibility(0);
            }
            TextView textView5 = this.tvMovieDurationInfo;
            if (textView5 != null) {
                textView5.setText("N/A");
            }
            TextView textView6 = this.tvCastInfo;
            if (textView6 != null) {
                textView6.setText("N/A");
            }
            TextView textView7 = this.tvDirectorInfo;
            if (textView7 != null) {
                textView7.setText("N/A");
            }
            TextView textView8 = this.tvReleaseDateInfo;
            if (textView8 != null) {
                textView8.setText("N/A");
            }
            TextView textView9 = this.tv_genre_info;
            if (textView9 != null) {
                textView9.setText("N/A");
            }
            textView = this.tvReadMore;
            if (textView == null) {
                return;
            }
        } else {
            int intValue2 = searchTMDBMoviesCallback.a().get(0).b().intValue();
            this.N.b(intValue2);
            this.N.d(intValue2);
            this.N.g(intValue2);
            this.N.c(intValue2);
            String e3 = searchTMDBMoviesCallback.a().get(0).e();
            Double g3 = searchTMDBMoviesCallback.a().get(0).g();
            String d3 = searchTMDBMoviesCallback.a().get(0).d();
            String a3 = searchTMDBMoviesCallback.a().get(0).a();
            if (new c.k.a.i.d.a.a(this.r).z().equals(c.k.a.g.n.a.s0)) {
                str2 = "https://image.tmdb.org/t/p/w1280/" + a3;
            } else {
                str2 = "https://image.tmdb.org/t/p/w500/" + a3;
            }
            if (this.appbarToolbar != null && a3 != null) {
                this.R = str2;
                c.d.a.g.u(getApplicationContext()).q(str2).J().m(new d());
            }
            if (this.llReleasedBox == null || this.llReleasedBoxInfo == null || this.tvReleaseDateInfo == null || e3 == null || e3.isEmpty() || e3.equals("n/A")) {
                LinearLayout linearLayout5 = this.llReleasedBox;
                if (linearLayout5 != null) {
                    linearLayout5.setVisibility(0);
                }
                LinearLayout linearLayout6 = this.llReleasedBoxInfo;
                if (linearLayout6 != null) {
                    linearLayout6.setVisibility(0);
                }
                TextView textView10 = this.tvReleaseDateInfo;
                if (textView10 != null) {
                    textView10.setText("N/A");
                }
            } else {
                this.llReleasedBox.setVisibility(0);
                this.llReleasedBoxInfo.setVisibility(0);
                this.tvReleaseDateInfo.setText(e3);
            }
            if (this.ratingBar != null && g3 != null && !g3.equals("n/A")) {
                this.ratingBar.setVisibility(0);
                try {
                    this.ratingBar.setRating(Float.parseFloat(String.valueOf(g3)) / 2.0f);
                } catch (NumberFormatException unused3) {
                    this.ratingBar.setRating(0.0f);
                }
            }
            if (this.tvMovieInfo != null && d3 != null && !d3.isEmpty() && !d3.equals("n/A")) {
                this.tvMovieInfo.setText(d3);
                return;
            }
            textView = this.tvMovieInfo;
            if (textView == null) {
                return;
            }
        }
        textView.setVisibility(8);
    }
}