Skip to content

Commit

Permalink
Naively deal with chapters with multiple dots. #8
Browse files Browse the repository at this point in the history
  • Loading branch information
funkyhippo committed Dec 21, 2021
1 parent 80d2b0d commit e0498e3
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion proxy/sources/mangadex.py
Original file line number Diff line number Diff line change
Expand Up @@ -291,7 +291,12 @@ def md_api_common(self, meta_id):
ch[1]["volume"] or "Unknown",
]
for ch in sorted(
chapter_dict.items(), key=lambda m: float(m[0]), reverse=True
chapter_dict.items(),
key=lambda m: float(
".".join(str(m[0]).split(".")[:2])
+ "".join(str(m[0]).split(".")[2:])
), # To get around weird chapter numbering like 21.15.1..
reverse=True,
)
]

Expand Down

0 comments on commit e0498e3

Please sign in to comment.