The crash is fixed somehow
This commit is contained in:
parent
d400ddc0a5
commit
04dc4ef66a
@ -642,6 +642,8 @@ class EHentai(
|
||||
*/
|
||||
override fun mangaDetailsParse(response: Response) = throw UnsupportedOperationException()
|
||||
|
||||
override fun newMetaInstance() = EHentaiSearchMetadata()
|
||||
|
||||
override suspend fun parseIntoMetadata(metadata: EHentaiSearchMetadata, input: Document) {
|
||||
with(metadata) {
|
||||
with(input) {
|
||||
|
@ -213,6 +213,8 @@ class MangaDex(delegate: HttpSource, val context: Context) :
|
||||
// MetadataSource methods
|
||||
override val metaClass: KClass<MangaDexSearchMetadata> = MangaDexSearchMetadata::class
|
||||
|
||||
override fun newMetaInstance() = MangaDexSearchMetadata()
|
||||
|
||||
override suspend fun parseIntoMetadata(metadata: MangaDexSearchMetadata, input: Triple<MangaDto, List<String>, StatisticsMangaDto>) {
|
||||
apiMangaParser.parseIntoMetadata(metadata, input.first, input.second, input.third)
|
||||
}
|
||||
|
@ -36,6 +36,7 @@ class NHentai(delegate: HttpSource, val context: Context) :
|
||||
NamespaceSource,
|
||||
PagePreviewSource {
|
||||
override val metaClass = NHentaiSearchMetadata::class
|
||||
override fun newMetaInstance() = NHentaiSearchMetadata()
|
||||
override val lang = delegate.lang
|
||||
|
||||
private val sourcePreferences: SharedPreferences by lazy {
|
||||
|
@ -24,6 +24,7 @@ class EightMuses(delegate: HttpSource, val context: Context) :
|
||||
UrlImportableSource,
|
||||
NamespaceSource {
|
||||
override val metaClass = EightMusesSearchMetadata::class
|
||||
override fun newMetaInstance() = EightMusesSearchMetadata()
|
||||
override val lang = "en"
|
||||
|
||||
// Support direct URL importing
|
||||
|
@ -23,6 +23,7 @@ class HBrowse(delegate: HttpSource, val context: Context) :
|
||||
UrlImportableSource,
|
||||
NamespaceSource {
|
||||
override val metaClass = HBrowseSearchMetadata::class
|
||||
override fun newMetaInstance() = HBrowseSearchMetadata()
|
||||
override val lang = "en"
|
||||
|
||||
// Support direct URL importing
|
||||
|
@ -36,6 +36,7 @@ class Pururin(delegate: HttpSource, val context: Context) :
|
||||
* The class of the metadata used by this source
|
||||
*/
|
||||
override val metaClass = PururinSearchMetadata::class
|
||||
override fun newMetaInstance() = PururinSearchMetadata()
|
||||
|
||||
// Support direct URL importing
|
||||
override fun fetchSearchManga(page: Int, query: String, filters: FilterList): Observable<MangasPage> {
|
||||
|
@ -30,6 +30,7 @@ class Tsumino(delegate: HttpSource, val context: Context) :
|
||||
UrlImportableSource,
|
||||
NamespaceSource {
|
||||
override val metaClass = TsuminoSearchMetadata::class
|
||||
override fun newMetaInstance() = TsuminoSearchMetadata()
|
||||
override val lang = "en"
|
||||
|
||||
// Support direct URL importing
|
||||
|
@ -33,10 +33,7 @@ class ApiMangaParser(
|
||||
/**
|
||||
* Use reflection to create a new instance of metadata
|
||||
*/
|
||||
private fun newMetaInstance() = metaClass.constructors.find {
|
||||
it.parameters.isEmpty()
|
||||
}?.call()
|
||||
?: error("Could not find no-args constructor for meta class: ${metaClass.qualifiedName}!")
|
||||
private fun newMetaInstance() = MangaDexSearchMetadata()
|
||||
|
||||
suspend fun parseToManga(
|
||||
manga: SManga,
|
||||
|
@ -3,3 +3,5 @@
|
||||
-keep class eu.kanade.tachiyomi.source.** extends eu.kanade.tachiyomi.source.Source { public protected *; }
|
||||
|
||||
-keep,allowoptimization class eu.kanade.tachiyomi.util.JsoupExtensionsKt { public protected *; }
|
||||
|
||||
-keep class exh.metadata.** { public protected *; }
|
@ -42,10 +42,7 @@ interface MetadataSource<M : RaisedSearchMetadata, I> : CatalogueSource {
|
||||
/**
|
||||
* Use reflection to create a new instance of metadata
|
||||
*/
|
||||
private fun newMetaInstance() = metaClass.constructors.find {
|
||||
it.parameters.isEmpty()
|
||||
}?.call()
|
||||
?: error("Could not find no-args constructor for meta class: ${metaClass.qualifiedName}!")
|
||||
fun newMetaInstance(): M
|
||||
|
||||
/**
|
||||
* Parses metadata from the input and then copies it into the manga
|
||||
|
Loading…
x
Reference in New Issue
Block a user