CosmicScansID | Fixed NullPointerException (#5243)

* Fixed NullPointerException when there's no thumbnail

* Apply suggestion
This commit is contained in:
KenjieDec 2024-09-28 13:33:28 +07:00 committed by Draff
parent 79690a5934
commit b86a8c4137
No known key found for this signature in database
GPG Key ID: E8A89F3211677653
2 changed files with 3 additions and 1 deletions

View File

@ -3,7 +3,7 @@ ext {
extClass = '.CosmicScansID' extClass = '.CosmicScansID'
themePkg = 'mangathemesia' themePkg = 'mangathemesia'
baseUrl = 'https://cosmic1.co' baseUrl = 'https://cosmic1.co'
overrideVersionCode = 4 overrideVersionCode = 5
} }
apply from: "$rootDir/common.gradle" apply from: "$rootDir/common.gradle"

View File

@ -8,6 +8,7 @@ import eu.kanade.tachiyomi.source.model.FilterList
import okhttp3.HttpUrl.Companion.toHttpUrl import okhttp3.HttpUrl.Companion.toHttpUrl
import okhttp3.OkHttpClient import okhttp3.OkHttpClient
import okhttp3.Request import okhttp3.Request
import org.jsoup.select.Elements
import java.util.concurrent.TimeUnit import java.util.concurrent.TimeUnit
class CosmicScansID : MangaThemesia("CosmicScans.id", "https://cosmic1.co", "id", "/semua-komik") { class CosmicScansID : MangaThemesia("CosmicScans.id", "https://cosmic1.co", "id", "/semua-komik") {
@ -55,6 +56,7 @@ class CosmicScansID : MangaThemesia("CosmicScans.id", "https://cosmic1.co", "id"
// manga details // manga details
override val seriesDescriptionSelector = ".entry-content[itemprop=description] :not(a,p:has(a))" override val seriesDescriptionSelector = ".entry-content[itemprop=description] :not(a,p:has(a))"
override fun Elements.imgAttr(): String = this.first()?.imgAttr() ?: ""
// pages // pages
override val pageSelector = "div#readerarea img:not(noscript img)" override val pageSelector = "div#readerarea img:not(noscript img)"