From 065ff132a0ef2ecec1f25bcdea452028f30b5583 Mon Sep 17 00:00:00 2001 From: DokterKaj <54882101+DokterKaj@users.noreply.github.com> Date: Fri, 27 Dec 2024 14:03:52 +0800 Subject: [PATCH] DeviantArt: Fix NullPointerException for some galleries (#6812) Select always-present element for gallery name --- src/all/deviantart/build.gradle | 2 +- .../eu/kanade/tachiyomi/extension/all/deviantart/DeviantArt.kt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/all/deviantart/build.gradle b/src/all/deviantart/build.gradle index 2d28101d2..81534ca6a 100644 --- a/src/all/deviantart/build.gradle +++ b/src/all/deviantart/build.gradle @@ -1,7 +1,7 @@ ext { extName = 'DeviantArt' extClass = '.DeviantArt' - extVersionCode = 1 + extVersionCode = 2 isNsfw = true } diff --git a/src/all/deviantart/src/eu/kanade/tachiyomi/extension/all/deviantart/DeviantArt.kt b/src/all/deviantart/src/eu/kanade/tachiyomi/extension/all/deviantart/DeviantArt.kt index b52a281da..5c56b1444 100644 --- a/src/all/deviantart/src/eu/kanade/tachiyomi/extension/all/deviantart/DeviantArt.kt +++ b/src/all/deviantart/src/eu/kanade/tachiyomi/extension/all/deviantart/DeviantArt.kt @@ -74,7 +74,7 @@ class DeviantArt : HttpSource() { val manga = SManga.create().apply { // If manga is sub-gallery then use sub-gallery name, else use gallery name title = subFolderGallery?.selectFirst("._2vMZg + ._2vMZg")?.text()?.substringBeforeLast(" ") - ?: document.selectFirst(".ds-card-selected h2")!!.text() + ?: subFolderGallery?.selectFirst("[aria-haspopup=listbox] > div")!!.ownText() author = document.title().substringBefore(" ") description = subFolderGallery?.selectFirst(".legacy-journal")?.wholeText() thumbnail_url = subFolderGallery?.selectFirst("img[property=contentUrl]")?.absUrl("src")