Skip to content

Commit 122d33e

Browse files
committed
Hide episode count in dashboard when count is 0
1 parent 3022e8d commit 122d33e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

cogs/jellyfin_core.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -669,8 +669,8 @@ async def create_dashboard_embed(self, info: Dict[str, Any]) -> discord.Embed:
669669
if stats.get('count', 0) > 0: # Only show libraries with items
670670
stats_text += f"{stats.get('emoji', '📁')} **{stats.get('display_name', 'Unknown Library')}**\n"
671671
stats_text += f"```css\nTotal Items: {stats.get('count', 0)}\n```\n"
672-
# Only show episodes if the key exists in the stats
673-
if 'episodes' in stats:
672+
# Only show episodes if the key exists in the stats and the count is greater than 0
673+
if 'episodes' in stats and stats['episodes'] > 0:
674674
stats_text += f"```css\nEpisodes: {stats['episodes']}\n```\n"
675675
if stats_text: # Only add the field if there are libraries to show
676676
embed.add_field(

0 commit comments

Comments
 (0)