From 8e88fb7f6549696e6d4c5a04f382e265bb0d8ae0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Joakim=20Hells=C3=A9n?= Date: Wed, 21 Dec 2022 01:37:40 +0100 Subject: [PATCH] Show feeds without webhooks --- discord_rss_bot/main.py | 2 +- discord_rss_bot/templates/index.html | 12 ++++++++++++ 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/discord_rss_bot/main.py b/discord_rss_bot/main.py index cbdc1aa..3f3d6fb 100644 --- a/discord_rss_bot/main.py +++ b/discord_rss_bot/main.py @@ -379,7 +379,7 @@ def make_context_index(request) -> dict: hook = reader.get_tag(feed.url, "webhook") feed_list.append({"feed": feed, "webhook": hook}) except TagNotFoundError: - broken_feeds.append({"feed": feed, "webhook": None}) + broken_feeds.append(feed) continue # Sort feed_list by when the feed was added. diff --git a/discord_rss_bot/templates/index.html b/discord_rss_bot/templates/index.html index b54b2ff..b782554 100644 --- a/discord_rss_bot/templates/index.html +++ b/discord_rss_bot/templates/index.html @@ -45,5 +45,17 @@ No feeds yet. Add one here.

{% endif %} + + + {% if broken_feeds %} +
+ +
+ {% endif %} {% endblock %} \ No newline at end of file