From c3e9fff49110d04b813b990a986bc744a6aba92d Mon Sep 17 00:00:00 2001 From: ricterzheng Date: Tue, 1 Oct 2024 12:47:13 +0900 Subject: [PATCH] fix bug #345 --- nhentai/doujinshi.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/nhentai/doujinshi.py b/nhentai/doujinshi.py index dcd3dc2..5478cb2 100644 --- a/nhentai/doujinshi.py +++ b/nhentai/doujinshi.py @@ -89,7 +89,8 @@ class Doujinshi(object): if options.is_cbz: ret_cbz = os.path.exists(f'{base_path}.cbz') or os.path.exists(f'{base_path}/{self.filename}.cbz') - if all(filter(lambda s: s is not None, [ret_cbz, ret_pdf])): + ret = list(filter(lambda s: s is not None, [ret_cbz, ret_pdf])) + if ret and all(ret): return False # doujinshi directory doesn't exist, re-download