From a27e8b99d95005f692018b5f77bda36c8cee20f7 Mon Sep 17 00:00:00 2001 From: tarsin Date: Tue, 20 Jun 2023 22:18:19 +0800 Subject: [PATCH] Fix parse e-hentai failed --- .../com/hippo/ehviewer/client/parser/GalleryListParser.kt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/com/hippo/ehviewer/client/parser/GalleryListParser.kt b/app/src/main/java/com/hippo/ehviewer/client/parser/GalleryListParser.kt index 4e5bce2c2..b1a168e5c 100644 --- a/app/src/main/java/com/hippo/ehviewer/client/parser/GalleryListParser.kt +++ b/app/src/main/java/com/hippo/ehviewer/client/parser/GalleryListParser.kt @@ -321,7 +321,7 @@ object GalleryListParser { val list = result.galleryInfoList list.addAll( es.mapNotNull { - parseGalleryInfo(it.toString())?.apply { + runCatching { parseGalleryInfo(it.toString()) }.onFailure { it.printStackTrace() }.getOrNull()?.apply { if (favoriteSlot == -2 && EhDB.containLocalFavorites(gid)) { favoriteSlot = -1 favoriteName = appCtx.getString(R.string.local_favorites) @@ -353,4 +353,4 @@ object GalleryListParser { } } -private external fun parseGalleryInfo(e: String): GalleryInfo? +private external fun parseGalleryInfo(e: String): GalleryInfo