From e707c801d35ebf2f32dd5761db9606031a6aec31 Mon Sep 17 00:00:00 2001 From: Alexander Metzger Date: Mon, 15 Jul 2024 14:56:49 -0700 Subject: [PATCH] only show connected to when different from the name --- recipes/VideoBotsStats.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/recipes/VideoBotsStats.py b/recipes/VideoBotsStats.py index a550c368e..6eee35825 100644 --- a/recipes/VideoBotsStats.py +++ b/recipes/VideoBotsStats.py @@ -442,14 +442,18 @@ def calculate_overall_stats(*, bi, run_title, run_url): rating=Feedback.Rating.RATING_THUMBS_DOWN, ).count() run_link = f'Powered By: {run_title}' - connection_detail = bi.get_display_name() + connection_detail = ( + f"- Connected to: {bi.get_display_name()}" + if bi.get_display_name() != bi.name + else "" + ) st.markdown( f""" - Platform: {Platform(bi.platform).name.capitalize()} - Created on: {bi.created_at.strftime("%b %d, %Y")} - Last Updated: {bi.updated_at.strftime("%b %d, %Y")} - {run_link} - - Connected to: {connection_detail} + {connection_detail} * {users.count()} Users * {num_active_users_last_7_days} Active Users (Last 7 Days) * {num_active_users_last_30_days} Active Users (Last 30 Days)