package xyz.netfly.player;

import androidx.emoji2.text.v;
import java.io.File;
import java.util.Locale;
import xyz.stream.utils.y;

/* JADX INFO: loaded from: classes3.dex */
public final class f implements y {

    /* JADX INFO: renamed from: a, reason: collision with root package name */
    public final /* synthetic */ File f35190a;

    /* JADX INFO: renamed from: b, reason: collision with root package name */
    public final /* synthetic */ String f35191b;

    /* JADX INFO: renamed from: c, reason: collision with root package name */
    public final /* synthetic */ int f35192c;

    /* JADX INFO: renamed from: d, reason: collision with root package name */
    public final /* synthetic */ String f35193d;

    /* JADX INFO: renamed from: e, reason: collision with root package name */
    public final /* synthetic */ String f35194e;

    /* JADX INFO: renamed from: f, reason: collision with root package name */
    public final /* synthetic */ String f35195f;

    /* JADX INFO: renamed from: g, reason: collision with root package name */
    public final /* synthetic */ n f35196g;

    public f(n nVar, File file, String str, int i10, String str2, String str3, String str4) {
        this.f35196g = nVar;
        this.f35190a = file;
        this.f35191b = str;
        this.f35192c = i10;
        this.f35193d = str2;
        this.f35194e = str3;
        this.f35195f = str4;
    }

    @Override // xyz.stream.utils.y
    public final void n(String str) {
        xyz.stream.api.q qVarG = xyz.stream.api.q.g();
        n nVar = this.f35196g;
        qVarG.a(nVar.f35229o);
        nVar.f35229o = null;
        new Thread(new v(nVar, this.f35190a, this.f35191b, 17)).start();
    }

    @Override // xyz.stream.utils.y
    public final void r(Exception exc) {
        int i10;
        StringBuilder sb = new StringBuilder("download subtitle error: ");
        sb.append(exc);
        sb.append(", url: ");
        n nVar = this.f35196g;
        sb.append(nVar.f35229o);
        xyz.stream.utils.h.c(sb.toString());
        xyz.stream.api.q.g().a(nVar.f35229o);
        nVar.f35229o = null;
        if (exc != null && exc.getMessage() != null) {
            String message = exc.getMessage();
            Locale locale = Locale.ROOT;
            if (message.toLowerCase(locale).contains("timeout") || exc.getMessage().toLowerCase(locale).contains("time out")) {
                if (!nVar.o() || (i10 = this.f35192c) >= 1) {
                    return;
                }
                nVar.f(i10 + 1, this.f35193d, this.f35194e, this.f35195f);
                return;
            }
        }
        nVar.f35225k.post(new c(nVar, 3));
    }
}
