From 6736d25ba223cfe7a4f1aa8cf94ef389ce97490e Mon Sep 17 00:00:00 2001 From: hanatsumi Date: Sat, 11 May 2024 18:43:01 -0300 Subject: [PATCH] fix(mangadex): do not fail chapter parsing if `externalUrl` is null --- src/rust/multi.mangadex/res/source.json | 2 +- src/rust/multi.mangadex/src/parser.rs | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/src/rust/multi.mangadex/res/source.json b/src/rust/multi.mangadex/res/source.json index 7dbcff70c..ded2a5a0f 100644 --- a/src/rust/multi.mangadex/res/source.json +++ b/src/rust/multi.mangadex/res/source.json @@ -4,7 +4,7 @@ "lang": "multi", "name": "MangaDex", "url": "https://mangadex.org", - "version": 7, + "version": 8, "minAppVersion": "0.5" }, "languages": [ diff --git a/src/rust/multi.mangadex/src/parser.rs b/src/rust/multi.mangadex/src/parser.rs index 530ff033f..be9e04b72 100644 --- a/src/rust/multi.mangadex/src/parser.rs +++ b/src/rust/multi.mangadex/src/parser.rs @@ -240,8 +240,7 @@ pub fn parse_chapter(chapter_object: ObjectRef) -> Result { // Fix for Skittyblock/aidoku-community-sources#25 let ext_url = attributes.get("externalUrl"); - if ext_url.is_none() - || ext_url.as_string().is_ok() + if ext_url.as_string().is_ok() || date_updated > crate::helper::current_date() { return Err(aidoku::error::AidokuError {