diff --git a/channels.yml b/channels.yml index f103e1c..050bdc5 100644 --- a/channels.yml +++ b/channels.yml @@ -81,7 +81,7 @@ channels: name: TheCommonToad url: https://www.youtube.com/channel/UC-QiBn6GsM3JZJAeAQpaGAA/videos - id: UCiJmdXTb76i8eIPXdJyf8ZQ - name: Channel UCiJmdXTb76i + name: Bridges of Meaning Hub url: https://www.youtube.com/channel/UCiJmdXTb76i8eIPXdJyf8ZQ/videos - id: UCM9Z05vuQhMEwsV03u6DrLA name: Cassidy van der Kamp @@ -264,7 +264,7 @@ channels: name: LeviathanForPlay url: https://www.youtube.com/@LeviathanForPlay/videos - id: UCehAungJpAeC-F3R5FwvvCQ - name: Channel UCehAungJpAeC + name: Wholly Unfocused url: https://www.youtube.com/channel/UCehAungJpAeC-F3R5FwvvCQ/videos - id: UC4YwC5zA9S_2EwthE27Xlew name: Channel UC4YwC5zA9S diff --git a/search_app.py b/search_app.py index e4a7826..3a07f42 100644 --- a/search_app.py +++ b/search_app.py @@ -1309,6 +1309,53 @@ def create_app(config: AppConfig = CONFIG) -> Flask: body = "\n".join(urls) + ("\n" if urls else "") return (body, 200, {"Content-Type": "text/plain; charset=utf-8"}) + @app.route("/channels") + def channels_page(): + try: + entries = load_channel_entries(config.channels_path) + except FileNotFoundError: + return "Channel list not found.", 404 + except Exception: + return "Failed to load channel list.", 500 + + rows = "" + for ch in entries: + name = ch.get("name") or ch.get("handle") or ch.get("id") or "Unknown" + url = ch.get("url", "") + # Link to the channel page, not the /videos tab + channel_url = url.replace("/videos", "") if url.endswith("/videos") else url + name_html = ( + f'{name}' + if channel_url + else name + ) + rows += f"
{len(entries)} channels tracked
+