mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
...
This commit is contained in:
parent
c3aa3b241f
commit
54c880fb2b
@ -46,6 +46,8 @@ def extract(filename, dir):
|
|||||||
|
|
||||||
def sort_key(filename):
|
def sort_key(filename):
|
||||||
bn, ext = filename.rpartition('.')[::2]
|
bn, ext = filename.rpartition('.')[::2]
|
||||||
|
if not bn and ext:
|
||||||
|
bn, ext = ext, bn
|
||||||
return (numeric_sort_key(bn), numeric_sort_key(ext))
|
return (numeric_sort_key(bn), numeric_sort_key(ext))
|
||||||
|
|
||||||
def extract_member(filename, match=re.compile(r'\.(jpg|jpeg|gif|png)\s*$', re.I), sort_alphabetically=False):
|
def extract_member(filename, match=re.compile(r'\.(jpg|jpeg|gif|png)\s*$', re.I), sort_alphabetically=False):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user