Temporary fix for empty filter list in MangaDex. (#14046)

This commit is contained in:
Alessandro Jean 2022-10-30 12:47:41 -03:00 committed by GitHub
parent 77fa13f023
commit c3a716a2b4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 3 deletions

View File

@ -6,7 +6,7 @@ ext {
extName = 'MangaDex'
pkgNameSuffix = 'all.mangadex'
extClass = '.MangaDexFactory'
extVersionCode = 172
extVersionCode = 173
isNsfw = true
}

View File

@ -251,7 +251,11 @@ abstract class MangaDex(final override val lang: String, private val dexLang: St
}
}
val finalUrl = helper.mdFilters.addFiltersToUrl(tempUrl, filters, dexLang)
val finalUrl = helper.mdFilters.addFiltersToUrl(
url = tempUrl,
filters = filters.ifEmpty { getFilterList() },
dexLang = dexLang
)
return GET(finalUrl, headers, CacheControl.FORCE_NETWORK)
}
@ -408,7 +412,7 @@ abstract class MangaDex(final override val lang: String, private val dexLang: St
* @see CoverListDto
*/
private fun fetchFirstVolumeCovers(mangaList: List<MangaDataDto>): Map<String, String>? {
if (!preferences.tryUsingFirstVolumeCover) {
if (!preferences.tryUsingFirstVolumeCover || mangaList.isEmpty()) {
return null
}