From 41ac3fe0e8d89be22f0e0e6f9db8accd25a99573 Mon Sep 17 00:00:00 2001 From: dec05eba Date: Thu, 6 Aug 2020 07:12:45 +0200 Subject: mangadex: Do not list chapters that are not released yet --- plugins/mangadex.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/plugins/mangadex.py b/plugins/mangadex.py index 08e85b5..59956a4 100755 --- a/plugins/mangadex.py +++ b/plugins/mangadex.py @@ -99,6 +99,7 @@ def list_chapters(url, chapter_list_input): 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 = [] @@ -106,6 +107,10 @@ def list_chapters(url, chapter_list_input): chapter_id = chapter_data[0] chapter = chapter_data[1] + timestamp = chapter.get("timestamp", 0) + if timestamp > time_now: + continue + lang_code = chapter.get("lang_code", "") if lang_code != lang: continue -- cgit v1.2.3