aboutsummaryrefslogtreecommitdiff
path: root/plugins/mangadex.py
diff options
context:
space:
mode:
authordec05eba <dec05eba@protonmail.com>2020-10-16 07:26:40 +0200
committerdec05eba <dec05eba@protonmail.com>2020-10-16 07:26:40 +0200
commit1530f898babb7939b22e4235e981a2cf60cd233f (patch)
tree825fc836ea8ae301adf7fe10947981b9061b53f4 /plugins/mangadex.py
parent0fdd38cb99915bf5f41f8b4ecb5fdb5be8014e5d (diff)
Mangadex: show search results in same order as website (not timestamp sorted)
Diffstat (limited to 'plugins/mangadex.py')
-rwxr-xr-xplugins/mangadex.py10
1 files changed, 1 insertions, 9 deletions
diff --git a/plugins/mangadex.py b/plugins/mangadex.py
index 59956a4..72b28f3 100755
--- a/plugins/mangadex.py
+++ b/plugins/mangadex.py
@@ -95,18 +95,10 @@ def list_chapters(url, chapter_list_input):
exit(2)
chapter_json = json_response["chapter"]
- chapters = []
- for key, value in chapter_json.items():
- chapters.append((key, value))
-
time_now = time.time()
- chapters = sorted(chapters, key=chapter_sort_func, reverse=True)
prev_chapter_number = ""
output_chapters = []
- for chapter_data in chapters:
- chapter_id = chapter_data[0]
- chapter = chapter_data[1]
-
+ for chapter_id, chapter in chapter_json.items():
timestamp = chapter.get("timestamp", 0)
if timestamp > time_now:
continue