package xyz.stream.api.database;

import androidx.room.RoomDatabase;
import xyz.stream.api.database.entity.LiveHistory;

/* JADX INFO: loaded from: classes3.dex */
public final /* synthetic */ class i implements Runnable {

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

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

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

    public /* synthetic */ i(l lVar, LiveHistory liveHistory, int i10) {
        this.f35818a = i10;
        this.f35819b = lVar;
        this.f35820c = liveHistory;
    }

    @Override // java.lang.Runnable
    public final void run() {
        int i10 = this.f35818a;
        LiveHistory liveHistory = this.f35820c;
        l lVar = this.f35819b;
        switch (i10) {
            case 0:
                LiveHistory liveHistory2 = (LiveHistory) androidx.room.util.b.b((RoomDatabase) ((com.bumptech.glide.load.engine.p) lVar.f35829b).f5756a, true, false, new vf.b(liveHistory.getChannelId().intValue(), 2, liveHistory.getRoleId()));
                if (liveHistory2 == null) {
                    com.bumptech.glide.load.engine.p pVar = (com.bumptech.glide.load.engine.p) lVar.f35829b;
                    androidx.room.util.b.b((RoomDatabase) pVar.f5756a, false, true, new vf.n(pVar, liveHistory, 1));
                } else {
                    liveHistory2.setUpdatedAt(liveHistory.getUpdatedAt());
                    liveHistory2.setTvgName(liveHistory.getTvgName());
                    liveHistory2.setTvgLogo(liveHistory.getTvgLogo());
                    liveHistory2.setGroupId(liveHistory.getGroupId());
                    liveHistory2.setGroupTitle(liveHistory.getGroupTitle());
                    liveHistory2.setRegion(liveHistory.getRegion());
                    liveHistory2.setUrl(liveHistory.getUrl());
                    liveHistory2.setChannelId(liveHistory.getChannelId());
                    liveHistory2.setUpdateDate(liveHistory.getUpdateDate());
                    liveHistory2.setIsPremium(liveHistory.getIsPremium());
                    liveHistory2.setIsIptv(liveHistory.getIsIptv());
                    liveHistory2.setBackupTurboUrl(liveHistory.getBackupTurboUrl());
                    liveHistory2.setContentRating(liveHistory.getContentRating());
                    liveHistory2.setEpgUrl(liveHistory.getEpgUrl());
                    liveHistory2.setProtocol(liveHistory.getProtocol());
                    liveHistory2.setCategoryProperty(liveHistory.getCategoryProperty());
                    com.bumptech.glide.load.engine.p pVar2 = (com.bumptech.glide.load.engine.p) lVar.f35829b;
                    androidx.room.util.b.b((RoomDatabase) pVar2.f5756a, false, true, new vf.n(pVar2, liveHistory2, 0));
                }
                xyz.stream.api.o.f().x(liveHistory.getChannelId().intValue());
                break;
            default:
                com.bumptech.glide.load.engine.p pVar3 = (com.bumptech.glide.load.engine.p) lVar.f35829b;
                androidx.room.util.b.b((RoomDatabase) pVar3.f5756a, false, true, new vf.n(pVar3, liveHistory, 2));
                break;
        }
    }
}
