package xyz.stream.api.database.entity;

import android.database.Cursor;
import android.os.Parcel;
import android.os.Parcelable;
import androidx.annotation.NonNull;
import androidx.room.ColumnInfo;
import androidx.room.Entity;
import androidx.room.PrimaryKey;
import tv.danmaku.ijk.media.player.IjkMediaMeta;
import xyz.stream.download.config.InnerConstant;

/* JADX INFO: loaded from: classes3.dex */
@Entity(tableName = "showcase_items")
public class ShowcaseItems implements Parcelable {
    public static final Parcelable.Creator<ShowcaseItems> CREATOR = new Parcelable.Creator<ShowcaseItems>() { // from class: xyz.stream.api.database.entity.ShowcaseItems.1
        @Override // android.os.Parcelable.Creator
        public ShowcaseItems createFromParcel(Parcel parcel) {
            return new ShowcaseItems(parcel);
        }

        @Override // android.os.Parcelable.Creator
        public ShowcaseItems[] newArray(int i10) {
            return new ShowcaseItems[i10];
        }
    };

    @ColumnInfo(name = "backdrop_path")
    String backdropPath;

    @ColumnInfo(name = "cms_updated_at")
    Integer cmsUpdatedAt;

    /* JADX INFO: renamed from: id, reason: collision with root package name */
    @PrimaryKey(autoGenerate = true)
    Integer f35805id;
    String path;

    @ColumnInfo(name = "play_count")
    Integer playCount;

    @ColumnInfo(name = "poster_path")
    String posterPath;

    @ColumnInfo(name = "release_date")
    String releaseDate;

    @ColumnInfo(name = "scratch_name")
    String scratchName;

    @ColumnInfo(name = "season_count")
    Integer seasonCount;

    @ColumnInfo(name = "seasons")
    String seasons;

    @ColumnInfo(name = "server_id")
    Integer serverId;

    @ColumnInfo(name = "source_type")
    Integer sourceType;
    String title;

    @ColumnInfo(name = "tmdb_id")
    Integer tmdbId;

    @ColumnInfo(name = "update_at")
    Integer updateAt;

    public ShowcaseItems(String str, String str2, String str3, Integer num, Integer num2, Integer num3, String str4, Integer num4, Integer num5, Integer num6, String str5, String str6, String str7, Integer num7) {
        this.title = str;
        this.posterPath = str2;
        this.backdropPath = str3;
        this.updateAt = num;
        this.cmsUpdatedAt = num2;
        this.sourceType = num3;
        this.seasons = str4;
        this.seasonCount = num4;
        this.playCount = num5;
        this.tmdbId = num6;
        this.releaseDate = str5;
        this.scratchName = str6;
        this.path = str7;
        this.serverId = num7;
    }

    public static ShowcaseItems fromCursor(Cursor cursor) {
        try {
            ShowcaseItems showcaseItems = new ShowcaseItems(cursor.getString(cursor.getColumnIndexOrThrow(IjkMediaMeta.IJKM_KEY_TITLE)), cursor.getString(cursor.getColumnIndexOrThrow("poster_path")), cursor.getString(cursor.getColumnIndexOrThrow("backdrop_path")), Integer.valueOf(cursor.getInt(cursor.getColumnIndexOrThrow("update_at"))), Integer.valueOf(cursor.getInt(cursor.getColumnIndexOrThrow("cms_updated_at"))), Integer.valueOf(cursor.getInt(cursor.getColumnIndexOrThrow("source_type"))), cursor.getString(cursor.getColumnIndexOrThrow("seasons")), Integer.valueOf(cursor.getInt(cursor.getColumnIndexOrThrow("season_count"))), Integer.valueOf(cursor.getInt(cursor.getColumnIndexOrThrow("play_count"))), Integer.valueOf(cursor.getInt(cursor.getColumnIndexOrThrow("tmdb_id"))), cursor.getString(cursor.getColumnIndexOrThrow("release_date")), cursor.getString(cursor.getColumnIndexOrThrow("scratch_name")), cursor.getString(cursor.getColumnIndexOrThrow("path")), Integer.valueOf(cursor.getInt(cursor.getColumnIndexOrThrow("server_id"))));
            showcaseItems.setId(Integer.valueOf(cursor.getInt(cursor.getColumnIndexOrThrow(InnerConstant.Db.f36069id))));
            return showcaseItems;
        } catch (Exception unused) {
            return null;
        }
    }

    @Override // android.os.Parcelable
    public int describeContents() {
        return 0;
    }

    public String getBackdropPath() {
        return this.backdropPath;
    }

    public Integer getCmsUpdatedAt() {
        return this.cmsUpdatedAt;
    }

    public Integer getId() {
        return this.f35805id;
    }

    public String getPath() {
        return this.path;
    }

    public Integer getPlayCount() {
        return this.playCount;
    }

    public String getPosterPath() {
        return this.posterPath;
    }

    public String getReleaseDate() {
        return this.releaseDate;
    }

    public String getScratchName() {
        return this.scratchName;
    }

    public Integer getSeasonCount() {
        return this.seasonCount;
    }

    public String getSeasons() {
        return this.seasons;
    }

    public Integer getServerId() {
        return this.serverId;
    }

    public Integer getSourceType() {
        return this.sourceType;
    }

    public String getTitle() {
        return this.title;
    }

    public Integer getTmdbId() {
        return this.tmdbId;
    }

    public Integer getUpdateAt() {
        return this.updateAt;
    }

    public void setBackdropPath(String str) {
        this.backdropPath = str;
    }

    public void setCmsUpdatedAt(Integer num) {
        this.cmsUpdatedAt = num;
    }

    public void setId(Integer num) {
        this.f35805id = num;
    }

    public void setPath(String str) {
        this.path = str;
    }

    public void setPlayCount(Integer num) {
        this.playCount = num;
    }

    public void setPosterPath(String str) {
        this.posterPath = str;
    }

    public void setReleaseDate(String str) {
        this.releaseDate = str;
    }

    public void setScratchName(String str) {
        this.scratchName = str;
    }

    public void setSeasonCount(Integer num) {
        this.seasonCount = num;
    }

    public void setSeasons(String str) {
        this.seasons = str;
    }

    public void setServerId(Integer num) {
        this.serverId = num;
    }

    public void setSourceType(Integer num) {
        this.sourceType = num;
    }

    public void setTitle(String str) {
        this.title = str;
    }

    public void setTmdbId(Integer num) {
        this.tmdbId = num;
    }

    public void setUpdateAt(Integer num) {
        this.updateAt = num;
    }

    @Override // android.os.Parcelable
    public void writeToParcel(@NonNull Parcel parcel, int i10) {
        if (this.f35805id == null) {
            parcel.writeByte((byte) 0);
        } else {
            parcel.writeByte((byte) 1);
            parcel.writeInt(this.f35805id.intValue());
        }
        parcel.writeString(this.title);
        parcel.writeString(this.posterPath);
        parcel.writeString(this.backdropPath);
        if (this.updateAt == null) {
            parcel.writeByte((byte) 0);
        } else {
            parcel.writeByte((byte) 1);
            parcel.writeInt(this.updateAt.intValue());
        }
        if (this.cmsUpdatedAt == null) {
            parcel.writeByte((byte) 0);
        } else {
            parcel.writeByte((byte) 1);
            parcel.writeInt(this.cmsUpdatedAt.intValue());
        }
        if (this.sourceType == null) {
            parcel.writeByte((byte) 0);
        } else {
            parcel.writeByte((byte) 1);
            parcel.writeInt(this.sourceType.intValue());
        }
        parcel.writeString(this.seasons);
        if (this.seasonCount == null) {
            parcel.writeByte((byte) 0);
        } else {
            parcel.writeByte((byte) 1);
            parcel.writeInt(this.seasonCount.intValue());
        }
        if (this.playCount == null) {
            parcel.writeByte((byte) 0);
        } else {
            parcel.writeByte((byte) 1);
            parcel.writeInt(this.playCount.intValue());
        }
        if (this.tmdbId == null) {
            parcel.writeByte((byte) 0);
        } else {
            parcel.writeByte((byte) 1);
            parcel.writeInt(this.tmdbId.intValue());
        }
        parcel.writeString(this.releaseDate);
        parcel.writeString(this.scratchName);
        parcel.writeString(this.path);
        if (this.serverId == null) {
            parcel.writeByte((byte) 0);
        } else {
            parcel.writeByte((byte) 1);
            parcel.writeInt(this.serverId.intValue());
        }
    }

    public ShowcaseItems(Parcel parcel) {
        if (parcel.readByte() == 0) {
            this.f35805id = null;
        } else {
            this.f35805id = Integer.valueOf(parcel.readInt());
        }
        this.title = parcel.readString();
        this.posterPath = parcel.readString();
        this.backdropPath = parcel.readString();
        if (parcel.readByte() == 0) {
            this.updateAt = null;
        } else {
            this.updateAt = Integer.valueOf(parcel.readInt());
        }
        if (parcel.readByte() == 0) {
            this.cmsUpdatedAt = null;
        } else {
            this.cmsUpdatedAt = Integer.valueOf(parcel.readInt());
        }
        if (parcel.readByte() == 0) {
            this.sourceType = null;
        } else {
            this.sourceType = Integer.valueOf(parcel.readInt());
        }
        this.seasons = parcel.readString();
        if (parcel.readByte() == 0) {
            this.seasonCount = null;
        } else {
            this.seasonCount = Integer.valueOf(parcel.readInt());
        }
        if (parcel.readByte() == 0) {
            this.playCount = null;
        } else {
            this.playCount = Integer.valueOf(parcel.readInt());
        }
        if (parcel.readByte() == 0) {
            this.tmdbId = null;
        } else {
            this.tmdbId = Integer.valueOf(parcel.readInt());
        }
        this.releaseDate = parcel.readString();
        this.scratchName = parcel.readString();
        this.path = parcel.readString();
        if (parcel.readByte() == 0) {
            this.serverId = null;
        } else {
            this.serverId = Integer.valueOf(parcel.readInt());
        }
    }
}
