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