From f514de44f6de9736651008fd888a8e7f17f9ff7f Mon Sep 17 00:00:00 2001 From: AppleTheGolden Date: Sat, 11 Oct 2025 18:13:55 +0200 Subject: [PATCH] fix error message for empty .cbz --- copyparty/mtag.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/copyparty/mtag.py b/copyparty/mtag.py index b9058a5a..a22fa0dd 100644 --- a/copyparty/mtag.py +++ b/copyparty/mtag.py @@ -168,12 +168,12 @@ def au_unpk( znil = [x for x in znil if "cover" in x[0]] or znil znil = [x for x in znil if CBZ_01.search(x[0])] or znil t = "cbz: %d files, %d hits" % (nf, len(znil)) + if not znil: + raise Exception("no images inside cbz") using = sorted(znil)[0][1].filename if znil: t += ", using " + using log(t) - if not znil: - raise Exception("no images inside cbz") fi = zf.open(using) elif pk == "epub":