mirror of
https://github.com/9001/copyparty.git
synced 2025-08-17 09:02:15 -06:00
cbz thumbnails: sort alphabetically
Comic readers will sort alphabetically, but that isn't always the order in which the files are stored in the zip.
This commit is contained in:
parent
03d23daecb
commit
542a1de1ba
|
@ -166,12 +166,13 @@ def au_unpk(
|
||||||
znil = [x for x in znil if "cover" in x[0]] or znil
|
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
|
znil = [x for x in znil if CBZ_01.search(x[0])] or znil
|
||||||
t = "cbz: %d files, %d hits" % (nf, len(znil))
|
t = "cbz: %d files, %d hits" % (nf, len(znil))
|
||||||
|
using = sorted(znil)[0][1].filename
|
||||||
if znil:
|
if znil:
|
||||||
t += ", using " + znil[0][1].filename
|
t += ", using " + using
|
||||||
log(t)
|
log(t)
|
||||||
if not znil:
|
if not znil:
|
||||||
raise Exception("no images inside cbz")
|
raise Exception("no images inside cbz")
|
||||||
fi = zf.open(znil[0][1])
|
fi = zf.open(using)
|
||||||
|
|
||||||
else:
|
else:
|
||||||
raise Exception("unknown compression %s" % (pk,))
|
raise Exception("unknown compression %s" % (pk,))
|
||||||
|
|
Loading…
Reference in a new issue