package com.strmr.ps.data.local.dao;

import android.database.Cursor;
import androidx.media3.extractor.text.ttml.TtmlNode;
import androidx.room.RoomDatabase;
import com.strmr.ps.data.local.dao.CachedContentDao;
import com.strmr.ps.data.local.entity.CachedContent;
import defpackage.e6a;
import defpackage.k00;
import defpackage.mk1;
import defpackage.n58;
import defpackage.oq8;
import defpackage.p58;
import defpackage.pe9;
import defpackage.rq6;
import defpackage.sp1;
import defpackage.vo6;
import defpackage.vw2;
import defpackage.xm2;
import defpackage.yn1;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import java.util.concurrent.Callable;
import kotlin.coroutines.Continuation;

/* JADX INFO: loaded from: classes3.dex */
public final class CachedContentDao_Impl implements CachedContentDao {
    private final RoomDatabase __db;
    private final xm2<CachedContent> __insertionAdapterOfCachedContent;
    private final oq8 __preparedStmtOfDeleteAllContent;
    private final oq8 __preparedStmtOfDeleteCategoryContent;
    private final oq8 __preparedStmtOfDeleteOldContent;
    private final oq8 __preparedStmtOfDeleteRange;

    public CachedContentDao_Impl(@vo6 RoomDatabase roomDatabase) {
        this.__db = roomDatabase;
        this.__insertionAdapterOfCachedContent = new xm2<CachedContent>(roomDatabase) { // from class: com.strmr.ps.data.local.dao.CachedContentDao_Impl.1
            @Override // defpackage.oq8
            @vo6
            public String createQuery() {
                return "INSERT OR REPLACE INTO `cached_content` (`id`,`tmdbId`,`imdbId`,`title`,`overview`,`posterUrl`,`backdropUrl`,`logoUrl`,`year`,`rating`,`ratingPercentage`,`genres`,`contentType`,`category`,`runtime`,`cast`,`certification`,`imdbRating`,`rottenTomatoesRating`,`traktRating`,`position`,`cachedAt`) VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)";
            }

            @Override // defpackage.xm2
            public void bind(@vo6 pe9 pe9Var, @vo6 CachedContent cachedContent) {
                pe9Var.bindString(1, cachedContent.getId());
                pe9Var.bindLong(2, cachedContent.getTmdbId());
                if (cachedContent.getImdbId() == null) {
                    pe9Var.bindNull(3);
                } else {
                    pe9Var.bindString(3, cachedContent.getImdbId());
                }
                pe9Var.bindString(4, cachedContent.getTitle());
                if (cachedContent.getOverview() == null) {
                    pe9Var.bindNull(5);
                } else {
                    pe9Var.bindString(5, cachedContent.getOverview());
                }
                if (cachedContent.getPosterUrl() == null) {
                    pe9Var.bindNull(6);
                } else {
                    pe9Var.bindString(6, cachedContent.getPosterUrl());
                }
                if (cachedContent.getBackdropUrl() == null) {
                    pe9Var.bindNull(7);
                } else {
                    pe9Var.bindString(7, cachedContent.getBackdropUrl());
                }
                if (cachedContent.getLogoUrl() == null) {
                    pe9Var.bindNull(8);
                } else {
                    pe9Var.bindString(8, cachedContent.getLogoUrl());
                }
                if (cachedContent.getYear() == null) {
                    pe9Var.bindNull(9);
                } else {
                    pe9Var.bindString(9, cachedContent.getYear());
                }
                if (cachedContent.getRating() == null) {
                    pe9Var.bindNull(10);
                } else {
                    pe9Var.bindDouble(10, cachedContent.getRating().doubleValue());
                }
                if (cachedContent.getRatingPercentage() == null) {
                    pe9Var.bindNull(11);
                } else {
                    pe9Var.bindLong(11, cachedContent.getRatingPercentage().intValue());
                }
                if (cachedContent.getGenres() == null) {
                    pe9Var.bindNull(12);
                } else {
                    pe9Var.bindString(12, cachedContent.getGenres());
                }
                pe9Var.bindString(13, cachedContent.getContentType());
                pe9Var.bindString(14, cachedContent.getCategory());
                if (cachedContent.getRuntime() == null) {
                    pe9Var.bindNull(15);
                } else {
                    pe9Var.bindString(15, cachedContent.getRuntime());
                }
                if (cachedContent.getCast() == null) {
                    pe9Var.bindNull(16);
                } else {
                    pe9Var.bindString(16, cachedContent.getCast());
                }
                if (cachedContent.getCertification() == null) {
                    pe9Var.bindNull(17);
                } else {
                    pe9Var.bindString(17, cachedContent.getCertification());
                }
                if (cachedContent.getImdbRating() == null) {
                    pe9Var.bindNull(18);
                } else {
                    pe9Var.bindString(18, cachedContent.getImdbRating());
                }
                if (cachedContent.getRottenTomatoesRating() == null) {
                    pe9Var.bindNull(19);
                } else {
                    pe9Var.bindString(19, cachedContent.getRottenTomatoesRating());
                }
                if (cachedContent.getTraktRating() == null) {
                    pe9Var.bindNull(20);
                } else {
                    pe9Var.bindDouble(20, cachedContent.getTraktRating().doubleValue());
                }
                pe9Var.bindLong(21, cachedContent.getPosition());
                pe9Var.bindLong(22, cachedContent.getCachedAt());
            }
        };
        this.__preparedStmtOfDeleteCategoryContent = new oq8(roomDatabase) { // from class: com.strmr.ps.data.local.dao.CachedContentDao_Impl.2
            @Override // defpackage.oq8
            @vo6
            public String createQuery() {
                return "DELETE FROM cached_content WHERE category = ?";
            }
        };
        this.__preparedStmtOfDeleteRange = new oq8(roomDatabase) { // from class: com.strmr.ps.data.local.dao.CachedContentDao_Impl.3
            @Override // defpackage.oq8
            @vo6
            public String createQuery() {
                return "DELETE FROM cached_content WHERE category = ? AND position BETWEEN ? AND ?";
            }
        };
        this.__preparedStmtOfDeleteOldContent = new oq8(roomDatabase) { // from class: com.strmr.ps.data.local.dao.CachedContentDao_Impl.4
            @Override // defpackage.oq8
            @vo6
            public String createQuery() {
                return "DELETE FROM cached_content WHERE cachedAt < ?";
            }
        };
        this.__preparedStmtOfDeleteAllContent = new oq8(roomDatabase) { // from class: com.strmr.ps.data.local.dao.CachedContentDao_Impl.5
            @Override // defpackage.oq8
            @vo6
            public String createQuery() {
                return "DELETE FROM cached_content";
            }
        };
    }

    @vo6
    public static List<Class<?>> getRequiredConverters() {
        return Collections.EMPTY_LIST;
    }

    /* JADX INFO: Access modifiers changed from: private */
    public /* synthetic */ Object lambda$replaceCategoryContent$0(String str, List list, Continuation continuation) {
        return CachedContentDao.DefaultImpls.replaceCategoryContent(this, str, list, continuation);
    }

    @Override // com.strmr.ps.data.local.dao.CachedContentDao
    public Object deleteAllContent(Continuation<? super e6a> continuation) {
        return mk1.b(this.__db, new Callable<e6a>() { // from class: com.strmr.ps.data.local.dao.CachedContentDao_Impl.10
            /* JADX WARN: Can't rename method to resolve collision */
            @Override // java.util.concurrent.Callable
            @vo6
            public e6a call() throws Exception {
                pe9 pe9VarAcquire = CachedContentDao_Impl.this.__preparedStmtOfDeleteAllContent.acquire();
                try {
                    CachedContentDao_Impl.this.__db.beginTransaction();
                    try {
                        pe9VarAcquire.executeUpdateDelete();
                        CachedContentDao_Impl.this.__db.setTransactionSuccessful();
                        return e6a.a;
                    } finally {
                        CachedContentDao_Impl.this.__db.endTransaction();
                    }
                } finally {
                    CachedContentDao_Impl.this.__preparedStmtOfDeleteAllContent.release(pe9VarAcquire);
                }
            }
        }, continuation);
    }

    @Override // com.strmr.ps.data.local.dao.CachedContentDao
    public Object deleteCategoryContent(final String str, Continuation<? super e6a> continuation) {
        return mk1.b(this.__db, new Callable<e6a>() { // from class: com.strmr.ps.data.local.dao.CachedContentDao_Impl.7
            /* JADX WARN: Can't rename method to resolve collision */
            @Override // java.util.concurrent.Callable
            @vo6
            public e6a call() throws Exception {
                pe9 pe9VarAcquire = CachedContentDao_Impl.this.__preparedStmtOfDeleteCategoryContent.acquire();
                pe9VarAcquire.bindString(1, str);
                try {
                    CachedContentDao_Impl.this.__db.beginTransaction();
                    try {
                        pe9VarAcquire.executeUpdateDelete();
                        CachedContentDao_Impl.this.__db.setTransactionSuccessful();
                        return e6a.a;
                    } finally {
                        CachedContentDao_Impl.this.__db.endTransaction();
                    }
                } finally {
                    CachedContentDao_Impl.this.__preparedStmtOfDeleteCategoryContent.release(pe9VarAcquire);
                }
            }
        }, continuation);
    }

    @Override // com.strmr.ps.data.local.dao.CachedContentDao
    public Object deleteOldContent(final long j, Continuation<? super e6a> continuation) {
        return mk1.b(this.__db, new Callable<e6a>() { // from class: com.strmr.ps.data.local.dao.CachedContentDao_Impl.9
            /* JADX WARN: Can't rename method to resolve collision */
            @Override // java.util.concurrent.Callable
            @vo6
            public e6a call() throws Exception {
                pe9 pe9VarAcquire = CachedContentDao_Impl.this.__preparedStmtOfDeleteOldContent.acquire();
                pe9VarAcquire.bindLong(1, j);
                try {
                    CachedContentDao_Impl.this.__db.beginTransaction();
                    try {
                        pe9VarAcquire.executeUpdateDelete();
                        CachedContentDao_Impl.this.__db.setTransactionSuccessful();
                        return e6a.a;
                    } finally {
                        CachedContentDao_Impl.this.__db.endTransaction();
                    }
                } finally {
                    CachedContentDao_Impl.this.__preparedStmtOfDeleteOldContent.release(pe9VarAcquire);
                }
            }
        }, continuation);
    }

    @Override // com.strmr.ps.data.local.dao.CachedContentDao
    public Object deleteRange(final String str, final int i, final int i2, Continuation<? super e6a> continuation) {
        return mk1.b(this.__db, new Callable<e6a>() { // from class: com.strmr.ps.data.local.dao.CachedContentDao_Impl.8
            /* JADX WARN: Can't rename method to resolve collision */
            @Override // java.util.concurrent.Callable
            @vo6
            public e6a call() throws Exception {
                pe9 pe9VarAcquire = CachedContentDao_Impl.this.__preparedStmtOfDeleteRange.acquire();
                pe9VarAcquire.bindString(1, str);
                pe9VarAcquire.bindLong(2, i);
                pe9VarAcquire.bindLong(3, i2);
                try {
                    CachedContentDao_Impl.this.__db.beginTransaction();
                    try {
                        pe9VarAcquire.executeUpdateDelete();
                        CachedContentDao_Impl.this.__db.setTransactionSuccessful();
                        return e6a.a;
                    } finally {
                        CachedContentDao_Impl.this.__db.endTransaction();
                    }
                } finally {
                    CachedContentDao_Impl.this.__preparedStmtOfDeleteRange.release(pe9VarAcquire);
                }
            }
        }, continuation);
    }

    @Override // com.strmr.ps.data.local.dao.CachedContentDao
    public Object getCategoryCount(String str, Continuation<? super Integer> continuation) {
        final p58 p58VarD = p58.d(1, "SELECT COUNT(*) FROM cached_content WHERE category = ?");
        return mk1.c(this.__db, false, vw2.f(p58VarD, 1, str), new Callable<Integer>() { // from class: com.strmr.ps.data.local.dao.CachedContentDao_Impl.15
            /* JADX WARN: Can't rename method to resolve collision */
            @Override // java.util.concurrent.Callable
            @vo6
            public Integer call() throws Exception {
                Cursor cursorB = sp1.b(CachedContentDao_Impl.this.__db, p58VarD, false);
                try {
                    int iValueOf = cursorB.moveToFirst() ? Integer.valueOf(cursorB.getInt(0)) : 0;
                    cursorB.close();
                    p58VarD.release();
                    return iValueOf;
                } catch (Throwable th) {
                    cursorB.close();
                    p58VarD.release();
                    throw th;
                }
            }
        }, continuation);
    }

    @Override // com.strmr.ps.data.local.dao.CachedContentDao
    public Object getCategoryTimestamp(String str, Continuation<? super Long> continuation) {
        final p58 p58VarD = p58.d(1, "SELECT MIN(cachedAt) FROM cached_content WHERE category = ?");
        return mk1.c(this.__db, false, vw2.f(p58VarD, 1, str), new Callable<Long>() { // from class: com.strmr.ps.data.local.dao.CachedContentDao_Impl.13
            /* JADX WARN: Can't rename method to resolve collision */
            @Override // java.util.concurrent.Callable
            @rq6
            public Long call() throws Exception {
                Cursor cursorB = sp1.b(CachedContentDao_Impl.this.__db, p58VarD, false);
                try {
                    Long lValueOf = null;
                    if (cursorB.moveToFirst() && !cursorB.isNull(0)) {
                        lValueOf = Long.valueOf(cursorB.getLong(0));
                    }
                    return lValueOf;
                } finally {
                    cursorB.close();
                    p58VarD.release();
                }
            }
        }, continuation);
    }

    @Override // com.strmr.ps.data.local.dao.CachedContentDao
    public Object getContentByCategory(String str, Continuation<? super List<CachedContent>> continuation) {
        final p58 p58VarD = p58.d(1, "SELECT * FROM cached_content WHERE category = ? ORDER BY position ASC");
        return mk1.c(this.__db, false, vw2.f(p58VarD, 1, str), new Callable<List<CachedContent>>() { // from class: com.strmr.ps.data.local.dao.CachedContentDao_Impl.11
            @Override // java.util.concurrent.Callable
            @vo6
            public List<CachedContent> call() throws Exception {
                AnonymousClass11 anonymousClass11;
                int iB;
                int iB2;
                int iB3;
                int iB4;
                int iB5;
                int iB6;
                int iB7;
                int iB8;
                int iB9;
                int iB10;
                int iB11;
                int iB12;
                int iB13;
                int iB14;
                Cursor cursorB = sp1.b(CachedContentDao_Impl.this.__db, p58VarD, false);
                try {
                    iB = yn1.b(cursorB, TtmlNode.ATTR_ID);
                    iB2 = yn1.b(cursorB, "tmdbId");
                    iB3 = yn1.b(cursorB, "imdbId");
                    iB4 = yn1.b(cursorB, "title");
                    iB5 = yn1.b(cursorB, "overview");
                    iB6 = yn1.b(cursorB, "posterUrl");
                    iB7 = yn1.b(cursorB, "backdropUrl");
                    iB8 = yn1.b(cursorB, "logoUrl");
                    iB9 = yn1.b(cursorB, "year");
                    iB10 = yn1.b(cursorB, "rating");
                    iB11 = yn1.b(cursorB, "ratingPercentage");
                    iB12 = yn1.b(cursorB, "genres");
                    iB13 = yn1.b(cursorB, "contentType");
                    iB14 = yn1.b(cursorB, "category");
                } catch (Throwable th) {
                    th = th;
                    anonymousClass11 = this;
                }
                try {
                    int iB15 = yn1.b(cursorB, "runtime");
                    int iB16 = yn1.b(cursorB, "cast");
                    int iB17 = yn1.b(cursorB, "certification");
                    int iB18 = yn1.b(cursorB, "imdbRating");
                    int iB19 = yn1.b(cursorB, "rottenTomatoesRating");
                    int iB20 = yn1.b(cursorB, "traktRating");
                    int iB21 = yn1.b(cursorB, "position");
                    int iB22 = yn1.b(cursorB, "cachedAt");
                    int i = iB14;
                    ArrayList arrayList = new ArrayList(cursorB.getCount());
                    while (cursorB.moveToNext()) {
                        String string = cursorB.getString(iB);
                        int i2 = cursorB.getInt(iB2);
                        String string2 = cursorB.isNull(iB3) ? null : cursorB.getString(iB3);
                        String string3 = cursorB.getString(iB4);
                        String string4 = cursorB.isNull(iB5) ? null : cursorB.getString(iB5);
                        String string5 = cursorB.isNull(iB6) ? null : cursorB.getString(iB6);
                        String string6 = cursorB.isNull(iB7) ? null : cursorB.getString(iB7);
                        String string7 = cursorB.isNull(iB8) ? null : cursorB.getString(iB8);
                        String string8 = cursorB.isNull(iB9) ? null : cursorB.getString(iB9);
                        Double dValueOf = cursorB.isNull(iB10) ? null : Double.valueOf(cursorB.getDouble(iB10));
                        Integer numValueOf = cursorB.isNull(iB11) ? null : Integer.valueOf(cursorB.getInt(iB11));
                        String string9 = cursorB.isNull(iB12) ? null : cursorB.getString(iB12);
                        String string10 = cursorB.getString(iB13);
                        int i3 = i;
                        String string11 = cursorB.getString(i3);
                        int i4 = iB;
                        int i5 = iB15;
                        String string12 = cursorB.isNull(i5) ? null : cursorB.getString(i5);
                        iB15 = i5;
                        int i6 = iB16;
                        String string13 = cursorB.isNull(i6) ? null : cursorB.getString(i6);
                        iB16 = i6;
                        int i7 = iB17;
                        String string14 = cursorB.isNull(i7) ? null : cursorB.getString(i7);
                        iB17 = i7;
                        int i8 = iB18;
                        String string15 = cursorB.isNull(i8) ? null : cursorB.getString(i8);
                        iB18 = i8;
                        int i9 = iB19;
                        String string16 = cursorB.isNull(i9) ? null : cursorB.getString(i9);
                        iB19 = i9;
                        int i10 = iB20;
                        Double dValueOf2 = cursorB.isNull(i10) ? null : Double.valueOf(cursorB.getDouble(i10));
                        iB20 = i10;
                        int i11 = iB21;
                        Double d = dValueOf2;
                        int i12 = cursorB.getInt(i11);
                        iB21 = i11;
                        int i13 = iB22;
                        iB22 = i13;
                        arrayList.add(new CachedContent(string, i2, string2, string3, string4, string5, string6, string7, string8, dValueOf, numValueOf, string9, string10, string11, string12, string13, string14, string15, string16, d, i12, cursorB.getLong(i13)));
                        iB = i4;
                        i = i3;
                    }
                    cursorB.close();
                    p58VarD.release();
                    return arrayList;
                } catch (Throwable th2) {
                    th = th2;
                    anonymousClass11 = this;
                    cursorB.close();
                    p58VarD.release();
                    throw th;
                }
            }
        }, continuation);
    }

    @Override // com.strmr.ps.data.local.dao.CachedContentDao
    public Object getContentById(String str, Continuation<? super CachedContent> continuation) {
        final p58 p58VarD = p58.d(1, "SELECT * FROM cached_content WHERE id = ? LIMIT 1");
        return mk1.c(this.__db, false, vw2.f(p58VarD, 1, str), new Callable<CachedContent>() { // from class: com.strmr.ps.data.local.dao.CachedContentDao_Impl.12
            /* JADX WARN: Can't rename method to resolve collision */
            @Override // java.util.concurrent.Callable
            @rq6
            public CachedContent call() throws Exception {
                int iB;
                int iB2;
                int iB3;
                int iB4;
                int iB5;
                int iB6;
                int iB7;
                int iB8;
                int iB9;
                int iB10;
                int iB11;
                int iB12;
                int iB13;
                int iB14;
                AnonymousClass12 anonymousClass12 = this;
                Cursor cursorB = sp1.b(CachedContentDao_Impl.this.__db, p58VarD, false);
                try {
                    iB = yn1.b(cursorB, TtmlNode.ATTR_ID);
                    iB2 = yn1.b(cursorB, "tmdbId");
                    iB3 = yn1.b(cursorB, "imdbId");
                    iB4 = yn1.b(cursorB, "title");
                    iB5 = yn1.b(cursorB, "overview");
                    iB6 = yn1.b(cursorB, "posterUrl");
                    iB7 = yn1.b(cursorB, "backdropUrl");
                    iB8 = yn1.b(cursorB, "logoUrl");
                    iB9 = yn1.b(cursorB, "year");
                    iB10 = yn1.b(cursorB, "rating");
                    iB11 = yn1.b(cursorB, "ratingPercentage");
                    iB12 = yn1.b(cursorB, "genres");
                    iB13 = yn1.b(cursorB, "contentType");
                    iB14 = yn1.b(cursorB, "category");
                } catch (Throwable th) {
                    th = th;
                }
                try {
                    int iB15 = yn1.b(cursorB, "runtime");
                    int iB16 = yn1.b(cursorB, "cast");
                    int iB17 = yn1.b(cursorB, "certification");
                    int iB18 = yn1.b(cursorB, "imdbRating");
                    int iB19 = yn1.b(cursorB, "rottenTomatoesRating");
                    int iB20 = yn1.b(cursorB, "traktRating");
                    int iB21 = yn1.b(cursorB, "position");
                    int iB22 = yn1.b(cursorB, "cachedAt");
                    CachedContent cachedContent = null;
                    if (cursorB.moveToFirst()) {
                        cachedContent = new CachedContent(cursorB.getString(iB), cursorB.getInt(iB2), cursorB.isNull(iB3) ? null : cursorB.getString(iB3), cursorB.getString(iB4), cursorB.isNull(iB5) ? null : cursorB.getString(iB5), cursorB.isNull(iB6) ? null : cursorB.getString(iB6), cursorB.isNull(iB7) ? null : cursorB.getString(iB7), cursorB.isNull(iB8) ? null : cursorB.getString(iB8), cursorB.isNull(iB9) ? null : cursorB.getString(iB9), cursorB.isNull(iB10) ? null : Double.valueOf(cursorB.getDouble(iB10)), cursorB.isNull(iB11) ? null : Integer.valueOf(cursorB.getInt(iB11)), cursorB.isNull(iB12) ? null : cursorB.getString(iB12), cursorB.getString(iB13), cursorB.getString(iB14), cursorB.isNull(iB15) ? null : cursorB.getString(iB15), cursorB.isNull(iB16) ? null : cursorB.getString(iB16), cursorB.isNull(iB17) ? null : cursorB.getString(iB17), cursorB.isNull(iB18) ? null : cursorB.getString(iB18), cursorB.isNull(iB19) ? null : cursorB.getString(iB19), cursorB.isNull(iB20) ? null : Double.valueOf(cursorB.getDouble(iB20)), cursorB.getInt(iB21), cursorB.getLong(iB22));
                    }
                    cursorB.close();
                    p58VarD.release();
                    return cachedContent;
                } catch (Throwable th2) {
                    th = th2;
                    anonymousClass12 = this;
                    cursorB.close();
                    p58VarD.release();
                    throw th;
                }
            }
        }, continuation);
    }

    @Override // com.strmr.ps.data.local.dao.CachedContentDao
    public Object getContentPage(String str, int i, int i2, Continuation<? super List<CachedContent>> continuation) {
        final p58 p58VarD = p58.d(3, "SELECT * FROM cached_content WHERE category = ? ORDER BY position ASC LIMIT ? OFFSET ?");
        p58VarD.bindString(1, str);
        p58VarD.bindLong(2, i);
        return mk1.c(this.__db, false, vw2.e(p58VarD, 3, i2), new Callable<List<CachedContent>>() { // from class: com.strmr.ps.data.local.dao.CachedContentDao_Impl.14
            @Override // java.util.concurrent.Callable
            @vo6
            public List<CachedContent> call() throws Exception {
                AnonymousClass14 anonymousClass14;
                int iB;
                int iB2;
                int iB3;
                int iB4;
                int iB5;
                int iB6;
                int iB7;
                int iB8;
                int iB9;
                int iB10;
                int iB11;
                int iB12;
                int iB13;
                int iB14;
                Cursor cursorB = sp1.b(CachedContentDao_Impl.this.__db, p58VarD, false);
                try {
                    iB = yn1.b(cursorB, TtmlNode.ATTR_ID);
                    iB2 = yn1.b(cursorB, "tmdbId");
                    iB3 = yn1.b(cursorB, "imdbId");
                    iB4 = yn1.b(cursorB, "title");
                    iB5 = yn1.b(cursorB, "overview");
                    iB6 = yn1.b(cursorB, "posterUrl");
                    iB7 = yn1.b(cursorB, "backdropUrl");
                    iB8 = yn1.b(cursorB, "logoUrl");
                    iB9 = yn1.b(cursorB, "year");
                    iB10 = yn1.b(cursorB, "rating");
                    iB11 = yn1.b(cursorB, "ratingPercentage");
                    iB12 = yn1.b(cursorB, "genres");
                    iB13 = yn1.b(cursorB, "contentType");
                    iB14 = yn1.b(cursorB, "category");
                } catch (Throwable th) {
                    th = th;
                    anonymousClass14 = this;
                }
                try {
                    int iB15 = yn1.b(cursorB, "runtime");
                    int iB16 = yn1.b(cursorB, "cast");
                    int iB17 = yn1.b(cursorB, "certification");
                    int iB18 = yn1.b(cursorB, "imdbRating");
                    int iB19 = yn1.b(cursorB, "rottenTomatoesRating");
                    int iB20 = yn1.b(cursorB, "traktRating");
                    int iB21 = yn1.b(cursorB, "position");
                    int iB22 = yn1.b(cursorB, "cachedAt");
                    int i3 = iB14;
                    ArrayList arrayList = new ArrayList(cursorB.getCount());
                    while (cursorB.moveToNext()) {
                        String string = cursorB.getString(iB);
                        int i4 = cursorB.getInt(iB2);
                        String string2 = cursorB.isNull(iB3) ? null : cursorB.getString(iB3);
                        String string3 = cursorB.getString(iB4);
                        String string4 = cursorB.isNull(iB5) ? null : cursorB.getString(iB5);
                        String string5 = cursorB.isNull(iB6) ? null : cursorB.getString(iB6);
                        String string6 = cursorB.isNull(iB7) ? null : cursorB.getString(iB7);
                        String string7 = cursorB.isNull(iB8) ? null : cursorB.getString(iB8);
                        String string8 = cursorB.isNull(iB9) ? null : cursorB.getString(iB9);
                        Double dValueOf = cursorB.isNull(iB10) ? null : Double.valueOf(cursorB.getDouble(iB10));
                        Integer numValueOf = cursorB.isNull(iB11) ? null : Integer.valueOf(cursorB.getInt(iB11));
                        String string9 = cursorB.isNull(iB12) ? null : cursorB.getString(iB12);
                        String string10 = cursorB.getString(iB13);
                        int i5 = i3;
                        String string11 = cursorB.getString(i5);
                        int i6 = iB;
                        int i7 = iB15;
                        String string12 = cursorB.isNull(i7) ? null : cursorB.getString(i7);
                        iB15 = i7;
                        int i8 = iB16;
                        String string13 = cursorB.isNull(i8) ? null : cursorB.getString(i8);
                        iB16 = i8;
                        int i9 = iB17;
                        String string14 = cursorB.isNull(i9) ? null : cursorB.getString(i9);
                        iB17 = i9;
                        int i10 = iB18;
                        String string15 = cursorB.isNull(i10) ? null : cursorB.getString(i10);
                        iB18 = i10;
                        int i11 = iB19;
                        String string16 = cursorB.isNull(i11) ? null : cursorB.getString(i11);
                        iB19 = i11;
                        int i12 = iB20;
                        Double dValueOf2 = cursorB.isNull(i12) ? null : Double.valueOf(cursorB.getDouble(i12));
                        iB20 = i12;
                        int i13 = iB21;
                        Double d = dValueOf2;
                        int i14 = cursorB.getInt(i13);
                        iB21 = i13;
                        int i15 = iB22;
                        iB22 = i15;
                        arrayList.add(new CachedContent(string, i4, string2, string3, string4, string5, string6, string7, string8, dValueOf, numValueOf, string9, string10, string11, string12, string13, string14, string15, string16, d, i14, cursorB.getLong(i15)));
                        iB = i6;
                        i3 = i5;
                    }
                    cursorB.close();
                    p58VarD.release();
                    return arrayList;
                } catch (Throwable th2) {
                    th = th2;
                    anonymousClass14 = this;
                    cursorB.close();
                    p58VarD.release();
                    throw th;
                }
            }
        }, continuation);
    }

    @Override // com.strmr.ps.data.local.dao.CachedContentDao
    public Object insertContent(final List<CachedContent> list, Continuation<? super e6a> continuation) {
        return mk1.b(this.__db, new Callable<e6a>() { // from class: com.strmr.ps.data.local.dao.CachedContentDao_Impl.6
            /* JADX WARN: Can't rename method to resolve collision */
            @Override // java.util.concurrent.Callable
            @vo6
            public e6a call() throws Exception {
                CachedContentDao_Impl.this.__db.beginTransaction();
                try {
                    CachedContentDao_Impl.this.__insertionAdapterOfCachedContent.insert((Iterable) list);
                    CachedContentDao_Impl.this.__db.setTransactionSuccessful();
                    return e6a.a;
                } finally {
                    CachedContentDao_Impl.this.__db.endTransaction();
                }
            }
        }, continuation);
    }

    @Override // com.strmr.ps.data.local.dao.CachedContentDao
    public Object replaceCategoryContent(String str, List<CachedContent> list, Continuation<? super e6a> continuation) {
        return n58.a(this.__db, new k00((Object) this, str, (Object) list, 1), continuation);
    }
}
