From 4f010acf4942192320f370c3f45f6ccfac2510f4 Mon Sep 17 00:00:00 2001 From: Fuwn Date: Sat, 29 Jul 2023 17:12:56 -0700 Subject: feat(index): hide missing by default --- src/due/html/anime.py | 2 +- src/due/html/manga.py | 2 +- src/due/routes/index.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/due/html/anime.py b/src/due/html/anime.py index dfbd741..92b4670 100644 --- a/src/due/html/anime.py +++ b/src/due/html/anime.py @@ -29,7 +29,7 @@ def anime_to_html(releasing_outdated_anime): if title is None: title = anime["title"]["romaji"] - if request.cookies.get("show_missing") is not None and str(available)[0] == "?": + if request.cookies.get("show_missing") is None and str(available)[0] == "?": ids.pop() continue diff --git a/src/due/html/manga.py b/src/due/html/manga.py index ea655ba..dbf6154 100644 --- a/src/due/html/manga.py +++ b/src/due/html/manga.py @@ -119,7 +119,7 @@ def manga_to_html(releasing_outdated_manga, show_missing): ) ) - if show_missing is not None and str(available)[0] == "?": + if show_missing is None and str(available)[0] == "?": ids.pop() return diff --git a/src/due/routes/index.py b/src/due/routes/index.py index 2783254..5fce75e 100644 --- a/src/due/routes/index.py +++ b/src/due/routes/index.py @@ -130,7 +130,7 @@ def home(username): f"""Log out from AniList ({name}) {"

You don't have any new activity statuses from the past day! Create one to keep your streak!

" if datetime.datetime.fromtimestamp(last_activity(user_name_to_id(name))).date() != datetime.date.today() else "

"}""", - f"""{'Show' if request.cookies.get('show_missing') else 'Hide'} unresolved

+ f"""{'Hide' if request.cookies.get('show_missing') else 'Show'} unresolved

Anime [{anime_length}] {round(anime_time, 2)}s {anime_html}
-- cgit v1.2.3